From 9266491964309e011b4d1202eb73a1222a74c043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Sat, 10 Feb 2024 17:12:10 +0100 Subject: [PATCH] Missing override & smaller improvements --- nano/lib/stats.hpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/nano/lib/stats.hpp b/nano/lib/stats.hpp index e644658051..6faca397b7 100644 --- a/nano/lib/stats.hpp +++ b/nano/lib/stats.hpp @@ -224,9 +224,8 @@ class stats final /** * Initialize stats with a config. - * @param config Configuration object; deserialized from config.json */ - stats (nano::stats_config config); + explicit stats (nano::stats_config); /** * Call this to override the default sample interval and capacity, for a specific stat entry. @@ -252,18 +251,18 @@ class stats final add (type, dir, 1); } - /** Increments the counter for \detail, but doesn't update at the type level */ - void inc_detail_only (stat::type type, stat::detail detail, stat::dir dir = stat::dir::in) - { - add (type, detail, dir, 1, true); - } - /** Increments the given counter */ void inc (stat::type type, stat::detail detail, stat::dir dir = stat::dir::in) { add (type, detail, dir, 1); } + /** Adds \p value to the given counter */ + void add (stat::type type, stat::detail detail, uint64_t value) + { + add (type, detail, stat::dir::in, value); + } + /** Adds \p value to the given counter */ void add (stat::type type, stat::dir dir, uint64_t value) {