aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralexvru <alexvru@ydb.tech>2023-07-03 22:55:17 +0300
committeralexvru <alexvru@ydb.tech>2023-07-03 22:55:17 +0300
commit77eda50891c73ac3cf8de6d8e90235e891f7ca8e (patch)
treedb5965f946bb98145abbad677aa5684137e19c84
parent098093ad8fa6d9cedceb6d17acbdc575d4ceff7b (diff)
downloadydb-77eda50891c73ac3cf8de6d8e90235e891f7ca8e.tar.gz
Fix critical TRcBuf issue
-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 8a6b8cd607..60d0ef904a 100644
--- a/library/cpp/actors/util/rc_buf.h
+++ b/library/cpp/actors/util/rc_buf.h
@@ -316,9 +316,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};
@@ -602,7 +605,7 @@ class TRcBuf {
}
explicit operator bool() const {
- return Owner;
+ return static_cast<bool>(Owner);
}
private: