aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/util
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2023-07-20 22:11:42 +0300
committerDaniil Cherednik <dan.cherednik@gmail.com>2023-07-20 22:11:42 +0300
commitd63f0523399ab2d93c1c6ca6c2dca082be5e52ba (patch)
tree1123a7aa3ac1d42f3ceaae288e639931d9dca92a /library/cpp/actors/util
parent068d4453cf9fc68c875eee73f5c637bb076f6a71 (diff)
downloadydb-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.h7
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: