[wpiutil] Clean up circular_buffer iterator syntax (#6020)

This commit is contained in:
Tyler Veness
2023-12-08 13:38:56 -08:00
committed by GitHub
parent 39a0bf4b98
commit a71adef316
2 changed files with 6 additions and 4 deletions

View File

@@ -5,6 +5,7 @@
#pragma once
#include <cstddef>
#include <iterator>
#include <vector>
namespace wpi {
@@ -32,7 +33,7 @@ class circular_buffer {
using reference = T&;
iterator(circular_buffer* buffer, size_t index)
: m_buffer(buffer), m_index(index) {}
: m_buffer{buffer}, m_index{index} {}
iterator& operator++() {
++m_index;
@@ -60,7 +61,7 @@ class circular_buffer {
using const_reference = const T&;
const_iterator(const circular_buffer* buffer, size_t index)
: m_buffer(buffer), m_index(index) {}
: m_buffer{buffer}, m_index{index} {}
const_iterator& operator++() {
++m_index;