aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/guard.h
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /util/system/guard.h
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
downloadydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/guard.h')
-rw-r--r--util/system/guard.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/util/system/guard.h b/util/system/guard.h
index 49d7a4b335..efc091d5f8 100644
--- a/util/system/guard.h
+++ b/util/system/guard.h
@@ -48,7 +48,7 @@ public:
inline TGuard(TGuard&& g) noexcept
: T_(g.T_)
{
- g.T_ = nullptr;
+ g.T_ = nullptr;
}
inline ~TGuard() {
@@ -58,7 +58,7 @@ public:
inline void Release() noexcept {
if (WasAcquired()) {
TOps::Release(T_);
- T_ = nullptr;
+ T_ = nullptr;
}
}
@@ -67,7 +67,7 @@ public:
}
inline bool WasAcquired() const noexcept {
- return T_ != nullptr;
+ return T_ != nullptr;
}
inline T* GetMutex() const noexcept {
@@ -150,12 +150,12 @@ public:
inline void Release() noexcept {
if (WasAcquired()) {
TOps::Release(T_);
- T_ = nullptr;
+ T_ = nullptr;
}
}
inline bool WasAcquired() const noexcept {
- return T_ != nullptr;
+ return T_ != nullptr;
}
explicit inline operator bool() const noexcept {
@@ -164,7 +164,7 @@ public:
private:
inline void Init(const T* t) noexcept {
- T_ = nullptr;
+ T_ = nullptr;
T* tMutable = const_cast<T*>(t);
if (TOps::TryAcquire(tMutable)) {
T_ = tMutable;