diff options
Diffstat (limited to 'common/intrusive_ptr.h')
-rw-r--r-- | common/intrusive_ptr.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/intrusive_ptr.h b/common/intrusive_ptr.h index 714a5617..0152b92a 100644 --- a/common/intrusive_ptr.h +++ b/common/intrusive_ptr.h @@ -81,9 +81,9 @@ public: explicit operator bool() const noexcept { return mPtr != nullptr; } - T& operator*() const noexcept { return *mPtr; } - T* operator->() const noexcept { return mPtr; } - T* get() const noexcept { return mPtr; } + [[nodiscard]] auto operator*() const noexcept -> T& { return *mPtr; } + [[nodiscard]] auto operator->() const noexcept -> T* { return mPtr; } + [[nodiscard]] auto get() const noexcept -> T* { return mPtr; } void reset(T *ptr=nullptr) noexcept { |