From 9fe6493fc289ce011831cd5591d7e7d1b04b017a Mon Sep 17 00:00:00 2001 From: Max Kellermann <max.kellermann@gmail.com> Date: Mon, 29 Jul 2024 22:06:55 +0200 Subject: [PATCH] util/CircularBuffer: use inline initializer --- src/util/CircularBuffer.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/CircularBuffer.hxx b/src/util/CircularBuffer.hxx index eb8d154cd..205ccf13f 100644 --- a/src/util/CircularBuffer.hxx +++ b/src/util/CircularBuffer.hxx @@ -30,19 +30,19 @@ protected: /** * The next index to be read. */ - size_type head; + size_type head = 0; /** * The next index to be written to. */ - size_type tail; + size_type tail = 0; const size_type capacity; const pointer data; public: constexpr CircularBuffer(pointer _data, size_type _capacity) - :head(0), tail(0), capacity(_capacity), data(_data) {} + :capacity(_capacity), data(_data) {} CircularBuffer(const CircularBuffer &other) = delete;