From 78fa6c94992a6d1a140da1354448a004e62c9683 Mon Sep 17 00:00:00 2001 From: azhirnov Date: Sat, 6 Feb 2021 00:35:37 +0300 Subject: merged with resource_signature --- Common/interface/RefCntAutoPtr.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Common/interface') diff --git a/Common/interface/RefCntAutoPtr.hpp b/Common/interface/RefCntAutoPtr.hpp index 45dbf574..0c261bd6 100644 --- a/Common/interface/RefCntAutoPtr.hpp +++ b/Common/interface/RefCntAutoPtr.hpp @@ -195,11 +195,11 @@ public: // All the access functions do not require locking reference counters pointer because if it is valid, // the smart pointer holds strong reference to the object and it thus cannot be released by // ohter thread - bool operator!() const noexcept { return m_pObject == nullptr; } - operator bool() const noexcept { return m_pObject != nullptr; } - bool operator==(const RefCntAutoPtr& Ptr) const noexcept { return m_pObject == Ptr.m_pObject; } - bool operator!=(const RefCntAutoPtr& Ptr) const noexcept { return m_pObject != Ptr.m_pObject; } - bool operator<(const RefCntAutoPtr& Ptr) const noexcept { return static_cast(*this) < static_cast(Ptr); } + bool operator!() const noexcept { return m_pObject == nullptr; } + explicit operator bool() const noexcept { return m_pObject != nullptr; } + bool operator==(const RefCntAutoPtr& Ptr) const noexcept { return m_pObject == Ptr.m_pObject; } + bool operator!=(const RefCntAutoPtr& Ptr) const noexcept { return m_pObject != Ptr.m_pObject; } + bool operator<(const RefCntAutoPtr& Ptr) const noexcept { return static_cast(*this) < static_cast(Ptr); } T& operator*() noexcept { return *m_pObject; } const T& operator*() const noexcept { return *m_pObject; } -- cgit v1.2.3