From 0c2e35c205ed0caa56cc4b06e9796ed0b8cf3268 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Thu, 15 Apr 2021 11:55:03 +0200 Subject: [PATCH] Real in-place construction in histogram --- pdns/histogram.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pdns/histogram.hh b/pdns/histogram.hh index ef14f9f8fd..9584536f0b 100644 --- a/pdns/histogram.hh +++ b/pdns/histogram.hh @@ -74,11 +74,11 @@ public: throw std::invalid_argument("boundary array's elements should be distinct"); } std::string str = prefix + "le-" + std::to_string(b); - d_buckets.emplace_back(B{str, b, 0}); + d_buckets.emplace_back(str, b, 0); prev = b; } // everything above last boundary - d_buckets.emplace_back(B{prefix + "le-max", std::numeric_limits::max(), 0}); + d_buckets.emplace_back(prefix + "le-max", std::numeric_limits::max(), 0); } const std::vector& getRawData() const @@ -98,7 +98,7 @@ public: uint64_t c{0}; for (const auto& b : d_buckets) { c += b.d_count; - ret.emplace_back(B{b.d_name, b.d_boundary, c}); + ret.emplace_back(b.d_name, b.d_boundary, c); } return ret; } -- 2.47.2