diff options
author | crupest <crupest@outlook.com> | 2022-02-14 22:51:37 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-02-14 22:51:37 +0800 |
commit | 21c1c3281cd4186d9810d68122e9e8e92da714ad (patch) | |
tree | a458a6329b82145dbd7e255cf11f203c9116dafe /include/cru/common/ClonablePtr.h | |
parent | 6593a25baa01687b9462f792ce91bd46909df229 (diff) | |
download | cru-21c1c3281cd4186d9810d68122e9e8e92da714ad.tar.gz cru-21c1c3281cd4186d9810d68122e9e8e92da714ad.tar.bz2 cru-21c1c3281cd4186d9810d68122e9e8e92da714ad.zip |
...
Diffstat (limited to 'include/cru/common/ClonablePtr.h')
-rw-r--r-- | include/cru/common/ClonablePtr.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/cru/common/ClonablePtr.h b/include/cru/common/ClonablePtr.h index 39b5b454..a2a88758 100644 --- a/include/cru/common/ClonablePtr.h +++ b/include/cru/common/ClonablePtr.h @@ -88,7 +88,7 @@ class ClonablePtr { public: pointer get() const noexcept { return ptr_.get(); } - operator bool() const noexcept { return ptr_; } + operator bool() const noexcept { return ptr_ != nullptr; } element_type& operator*() const noexcept { return *ptr_; } pointer operator->() const noexcept { return ptr_.get(); } |