util/CircularBuffer: use inline initializer
This commit is contained in:
parent
902cb8efac
commit
9fe6493fc2
|
@ -30,19 +30,19 @@ protected:
|
||||||
/**
|
/**
|
||||||
* The next index to be read.
|
* The next index to be read.
|
||||||
*/
|
*/
|
||||||
size_type head;
|
size_type head = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The next index to be written to.
|
* The next index to be written to.
|
||||||
*/
|
*/
|
||||||
size_type tail;
|
size_type tail = 0;
|
||||||
|
|
||||||
const size_type capacity;
|
const size_type capacity;
|
||||||
const pointer data;
|
const pointer data;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
constexpr CircularBuffer(pointer _data, size_type _capacity)
|
constexpr CircularBuffer(pointer _data, size_type _capacity)
|
||||||
:head(0), tail(0), capacity(_capacity), data(_data) {}
|
:capacity(_capacity), data(_data) {}
|
||||||
|
|
||||||
CircularBuffer(const CircularBuffer &other) = delete;
|
CircularBuffer(const CircularBuffer &other) = delete;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue