[wpiutil] circular_buffer: Use value initialization instead of passing zero (#3303)

This enables use of types that have a no-args constructor rather than one that takes an explicit zero value.
For numeric types, value initialization will result in a zero value, so this is not a functional change.
This commit is contained in:
Tyler Veness
2021-04-15 11:50:07 -07:00
committed by GitHub
parent 948625de9d
commit 4630191fa4

View File

@@ -11,7 +11,7 @@
namespace wpi {
template <class T>
circular_buffer<T>::circular_buffer(size_t size) : m_data(size, T{0}) {}
circular_buffer<T>::circular_buffer(size_t size) : m_data(size, T{}) {}
/**
* Returns number of elements in buffer