mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
[wpiutil] Clean up circular_buffer iterator syntax (#6020)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
|
||||
namespace wpi {
|
||||
|
||||
@@ -27,7 +28,7 @@ class static_circular_buffer {
|
||||
using reference = T&;
|
||||
|
||||
iterator(static_circular_buffer* buffer, size_t index)
|
||||
: m_buffer(buffer), m_index(index) {}
|
||||
: m_buffer{buffer}, m_index{index} {}
|
||||
|
||||
iterator& operator++() {
|
||||
++m_index;
|
||||
@@ -55,7 +56,7 @@ class static_circular_buffer {
|
||||
using const_reference = const T&;
|
||||
|
||||
const_iterator(const static_circular_buffer* buffer, size_t index)
|
||||
: m_buffer(buffer), m_index(index) {}
|
||||
: m_buffer{buffer}, m_index{index} {}
|
||||
|
||||
const_iterator& operator++() {
|
||||
++m_index;
|
||||
|
||||
Reference in New Issue
Block a user