From b8edd926983554ef1fb8f2b986604544cc8bf3dc Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Thu, 1 Aug 2024 15:23:43 -0700 Subject: [PATCH] Fix warning --- ConflictSet.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index d1f8ef2..1588883 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -720,16 +720,18 @@ struct ReadContext { struct WriteContext { struct Accum { - int64_t entries_erased = 0; - int64_t insert_iterations = 0; - int64_t entries_inserted = 0; - int64_t nodes_allocated = 0; - int64_t nodes_released = 0; - int64_t point_writes = 0; - int64_t range_writes = 0; - int64_t write_bytes = 0; + int64_t entries_erased; + int64_t insert_iterations; + int64_t entries_inserted; + int64_t nodes_allocated; + int64_t nodes_released; + int64_t point_writes; + int64_t range_writes; + int64_t write_bytes; } accum; + WriteContext() { memset(&accum, 0, sizeof(accum)); } + template T *allocate(int c) { ++accum.nodes_allocated; if constexpr (std::is_same_v) {