diff options
| author | levlam <levlam@telegram.org> | 2022-10-09 19:30:18 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2022-10-09 19:30:18 +0300 |
| commit | 683627a350e823957e35e401c3f83790f728c296 (patch) | |
| tree | 8c2bf4222b5d68a10c9d99d330c07cda840bfedc /tdutils/td/utils/SharedObjectPool.h | |
| parent | 445cd4118d4de3534834c26d211ae1aca3564af1 (diff) | |
Make all operator bool const and nonexcept.
Diffstat (limited to 'tdutils/td/utils/SharedObjectPool.h')
| -rw-r--r-- | tdutils/td/utils/SharedObjectPool.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tdutils/td/utils/SharedObjectPool.h b/tdutils/td/utils/SharedObjectPool.h index 36e2c6cca..850c14aa2 100644 --- a/tdutils/td/utils/SharedObjectPool.h +++ b/tdutils/td/utils/SharedObjectPool.h @@ -123,10 +123,10 @@ class SharedPtr { other.raw_ = nullptr; return *this; } - bool empty() const { + bool empty() const noexcept { return raw_ == nullptr; } - explicit operator bool() const { + explicit operator bool() const noexcept { return !empty(); } uint64 use_cnt() const { @@ -255,7 +255,7 @@ class SharedObjectPool { Raw *get() const { return raw_; } - explicit operator bool() const { + explicit operator bool() noexcept { return raw_ != nullptr; } |
