From 41efd2a342bf21ed508c248ae2ea9a1d76e8753c Mon Sep 17 00:00:00 2001 From: arcadia-devtools <arcadia-devtools@yandex-team.ru> Date: Fri, 17 Jun 2022 02:25:55 +0300 Subject: intermediate changes ref:d0ce1d9d4e9d8b7d3aec4b22f416a01feec11da5 --- library/cpp/monlib/counters/counters.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'library/cpp/monlib/counters/counters.h') diff --git a/library/cpp/monlib/counters/counters.h b/library/cpp/monlib/counters/counters.h index 4f5eba4fc3..d3943d6578 100644 --- a/library/cpp/monlib/counters/counters.h +++ b/library/cpp/monlib/counters/counters.h @@ -46,7 +46,7 @@ namespace NMonitoring { { } - TDeprecatedCounter(TValue value, bool derivative = false) + TDeprecatedCounter(TValueBase value, bool derivative = false) : Value(value) , Derivative(derivative) { @@ -63,7 +63,7 @@ namespace NMonitoring { return AtomicGet(Value); } - void Set(TValue val) { + void Set(TValueBase val) { AtomicSet(Value, val); } @@ -74,10 +74,10 @@ namespace NMonitoring { return AtomicDecrement(Value); } - TValueBase Add(const TValue val) { + TValueBase Add(const TValueBase val) { return AtomicAdd(Value, val); } - TValueBase Sub(const TValue val) { + TValueBase Sub(const TValueBase val) { return AtomicAdd(Value, -val); } @@ -96,14 +96,14 @@ namespace NMonitoring { Dec(); } - void operator+=(TValue rhs) { + void operator+=(TValueBase rhs) { Add(rhs); } - void operator-=(TValue rhs) { + void operator-=(TValueBase rhs) { Sub(rhs); } - TValueBase operator=(TValue rhs) { + TValueBase operator=(TValueBase rhs) { AtomicSwap(&Value, rhs); return rhs; } -- cgit v1.2.3