diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2023-07-20 22:11:42 +0300 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2023-07-20 22:11:42 +0300 |
commit | d63f0523399ab2d93c1c6ca6c2dca082be5e52ba (patch) | |
tree | 1123a7aa3ac1d42f3ceaae288e639931d9dca92a /library/cpp/actors/util | |
parent | 068d4453cf9fc68c875eee73f5c637bb076f6a71 (diff) | |
download | ydb-d63f0523399ab2d93c1c6ca6c2dca082be5e52ba.tar.gz |
Ydb stable 23-2-1123.2.11
x-stable-origin-commit: 758ace972646c843c5e0785d75c8f4fe044580a1
Diffstat (limited to 'library/cpp/actors/util')
-rw-r--r-- | library/cpp/actors/util/rc_buf.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/library/cpp/actors/util/rc_buf.h b/library/cpp/actors/util/rc_buf.h index a2bce33fba..5d4517ade2 100644 --- a/library/cpp/actors/util/rc_buf.h +++ b/library/cpp/actors/util/rc_buf.h @@ -306,9 +306,12 @@ class TRcBuf { struct TBackendHolder { uintptr_t Data[2]; - operator bool() const noexcept { + explicit operator bool() const noexcept { return Data[0] || Data[1]; } + friend bool operator ==(const TBackendHolder& x, const TBackendHolder& y) { + return x.Data[0] == y.Data[0] && x.Data[1] == y.Data[1]; + } }; constexpr static TBackendHolder Empty = {0, 0}; @@ -592,7 +595,7 @@ class TRcBuf { } explicit operator bool() const { - return Owner; + return static_cast<bool>(Owner); } private: |