aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/threading/atomic/bool.h
diff options
context:
space:
mode:
authorvmordovin <vmordovin@yandex-team.ru>2022-02-10 16:48:14 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:14 +0300
commit7c7f9bbcf57e15838d15afa94b31d8254b5d7776 (patch)
tree17073f853e6b3a1a95708e8aa0ea12fa42a717e7 /library/cpp/threading/atomic/bool.h
parent466f96709329ff77ded50177df94d1893a226c00 (diff)
downloadydb-7c7f9bbcf57e15838d15afa94b31d8254b5d7776.tar.gz
Restoring authorship annotation for <vmordovin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/threading/atomic/bool.h')
-rw-r--r--library/cpp/threading/atomic/bool.h54
1 files changed, 27 insertions, 27 deletions
diff --git a/library/cpp/threading/atomic/bool.h b/library/cpp/threading/atomic/bool.h
index d52544e762..13b5e5356a 100644
--- a/library/cpp/threading/atomic/bool.h
+++ b/library/cpp/threading/atomic/bool.h
@@ -1,36 +1,36 @@
#pragma once
-#include <util/system/atomic.h>
-
-namespace NAtomic {
- class TBool {
- public:
- TBool() noexcept = default;
-
- TBool(bool val) noexcept
- : Val_(val)
- {
- }
-
+#include <util/system/atomic.h>
+
+namespace NAtomic {
+ class TBool {
+ public:
+ TBool() noexcept = default;
+
+ TBool(bool val) noexcept
+ : Val_(val)
+ {
+ }
+
TBool(const TBool& src) noexcept {
AtomicSet(Val_, AtomicGet(src.Val_));
}
- operator bool() const noexcept {
- return AtomicGet(Val_);
- }
-
+ operator bool() const noexcept {
+ return AtomicGet(Val_);
+ }
+
const TBool& operator=(bool val) noexcept {
- AtomicSet(Val_, val);
- return *this;
- }
-
+ AtomicSet(Val_, val);
+ return *this;
+ }
+
const TBool& operator=(const TBool& src) noexcept {
- AtomicSet(Val_, AtomicGet(src.Val_));
- return *this;
- }
-
- private:
- TAtomic Val_ = 0;
- };
+ AtomicSet(Val_, AtomicGet(src.Val_));
+ return *this;
+ }
+
+ private:
+ TAtomic Val_ = 0;
+ };
}