aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/lwtrace/check.h
diff options
context:
space:
mode:
authorserxa <serxa@yandex-team.ru>2022-02-10 16:49:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:08 +0300
commite5d4696304c6689379ac7ce334512404d4b7836c (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/lwtrace/check.h
parentd6d7db348c2cc64e71243cab9940ee6778f4317d (diff)
downloadydb-e5d4696304c6689379ac7ce334512404d4b7836c.tar.gz
Restoring authorship annotation for <serxa@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/lwtrace/check.h')
-rw-r--r--library/cpp/lwtrace/check.h154
1 files changed, 77 insertions, 77 deletions
diff --git a/library/cpp/lwtrace/check.h b/library/cpp/lwtrace/check.h
index e346e04dfb..71503cbc7b 100644
--- a/library/cpp/lwtrace/check.h
+++ b/library/cpp/lwtrace/check.h
@@ -1,78 +1,78 @@
-#pragma once
-
-namespace NLWTrace {
- struct TCheck {
- int Value;
- static int ObjCount;
-
- TCheck()
- : Value(0)
- {
- ObjCount++;
- }
-
- explicit TCheck(int value)
- : Value(value)
- {
- ObjCount++;
- }
-
- TCheck(const TCheck& o)
- : Value(o.Value)
- {
- ObjCount++;
- }
-
- ~TCheck() {
- ObjCount--;
- }
-
- bool operator<(const TCheck& rhs) const {
- return Value < rhs.Value;
- }
- bool operator>(const TCheck& rhs) const {
- return Value > rhs.Value;
- }
- bool operator<=(const TCheck& rhs) const {
- return Value <= rhs.Value;
- }
- bool operator>=(const TCheck& rhs) const {
- return Value >= rhs.Value;
- }
- bool operator==(const TCheck& rhs) const {
- return Value == rhs.Value;
- }
- bool operator!=(const TCheck& rhs) const {
- return Value != rhs.Value;
- }
- TCheck operator+(const TCheck& rhs) const {
- return TCheck(Value + rhs.Value);
- }
- TCheck operator-(const TCheck& rhs) const {
- return TCheck(Value - rhs.Value);
- }
- TCheck operator*(const TCheck& rhs) const {
- return TCheck(Value * rhs.Value);
- }
- TCheck operator/(const TCheck& rhs) const {
- return TCheck(Value / rhs.Value);
- }
- TCheck operator%(const TCheck& rhs) const {
- return TCheck(Value % rhs.Value);
- }
-
- void Add(const TCheck rhs) {
- Value += rhs.Value;
- }
- void Sub(const TCheck rhs) {
- Value -= rhs.Value;
- }
- void Inc() {
- ++Value;
- }
- void Dec() {
- --Value;
- }
- };
+#pragma once
-}
+namespace NLWTrace {
+ struct TCheck {
+ int Value;
+ static int ObjCount;
+
+ TCheck()
+ : Value(0)
+ {
+ ObjCount++;
+ }
+
+ explicit TCheck(int value)
+ : Value(value)
+ {
+ ObjCount++;
+ }
+
+ TCheck(const TCheck& o)
+ : Value(o.Value)
+ {
+ ObjCount++;
+ }
+
+ ~TCheck() {
+ ObjCount--;
+ }
+
+ bool operator<(const TCheck& rhs) const {
+ return Value < rhs.Value;
+ }
+ bool operator>(const TCheck& rhs) const {
+ return Value > rhs.Value;
+ }
+ bool operator<=(const TCheck& rhs) const {
+ return Value <= rhs.Value;
+ }
+ bool operator>=(const TCheck& rhs) const {
+ return Value >= rhs.Value;
+ }
+ bool operator==(const TCheck& rhs) const {
+ return Value == rhs.Value;
+ }
+ bool operator!=(const TCheck& rhs) const {
+ return Value != rhs.Value;
+ }
+ TCheck operator+(const TCheck& rhs) const {
+ return TCheck(Value + rhs.Value);
+ }
+ TCheck operator-(const TCheck& rhs) const {
+ return TCheck(Value - rhs.Value);
+ }
+ TCheck operator*(const TCheck& rhs) const {
+ return TCheck(Value * rhs.Value);
+ }
+ TCheck operator/(const TCheck& rhs) const {
+ return TCheck(Value / rhs.Value);
+ }
+ TCheck operator%(const TCheck& rhs) const {
+ return TCheck(Value % rhs.Value);
+ }
+
+ void Add(const TCheck rhs) {
+ Value += rhs.Value;
+ }
+ void Sub(const TCheck rhs) {
+ Value -= rhs.Value;
+ }
+ void Inc() {
+ ++Value;
+ }
+ void Dec() {
+ --Value;
+ }
+ };
+
+}