From 954068ba3af94d311db9d2293c7080325bc88d13 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Thu, 22 Aug 2024 19:53:53 +0300 Subject: [PATCH] Fix merging util::statistics --- libs/util/include/psemek/util/statistics.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/util/include/psemek/util/statistics.hpp b/libs/util/include/psemek/util/statistics.hpp index 7859f1fc..e7643125 100644 --- a/libs/util/include/psemek/util/statistics.hpp +++ b/libs/util/include/psemek/util/statistics.hpp @@ -236,7 +236,8 @@ namespace psemek::util template statistics_log_bucket::statistics_log_bucket(statistics_log_bucket && other) - : precision_(other.precision_) + : statistics_lite(other.lite()) + , precision_(other.precision_) , zero_count_(other.zero_count_) , buckets_(std::move(other.buckets_)) , prefix_count_(std::move(other.prefix_count_)) @@ -250,6 +251,7 @@ namespace psemek::util if (this == &other) return *this; + static_cast &>(*this) = other.lite(); precision_ = other.precision_; zero_count_ = other.zero_count_; buckets_ = std::move(other.buckets_);