From 4d23068c5cf6151b3612095a43451819d698a454 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 26 Nov 2023 08:40:55 +0100 Subject: [PATCH] queue/IdTable: use C++11 initializer --- src/queue/IdTable.hxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/queue/IdTable.hxx b/src/queue/IdTable.hxx index 97a1b0498..31a44c846 100644 --- a/src/queue/IdTable.hxx +++ b/src/queue/IdTable.hxx @@ -21,14 +21,13 @@ class IdTable { */ unsigned initialized = 1; - unsigned next; + unsigned next = 1; - int *const data; + int *const data = new int[size]; public: IdTable(unsigned _size) noexcept - :size(_size), next(1), data(new int[size]) { - } + :size(_size) {} ~IdTable() noexcept { delete[] data;