From 83d2351fd64128156c9abfb70266133d58a5e525 Mon Sep 17 00:00:00 2001 From: tsepez Date: Fri, 26 Aug 2016 14:56:39 -0700 Subject: Remove CFX_CountRef::IsNull in favor of operator bool Review-Url: https://codereview.chromium.org/2285513002 --- core/fxcrt/include/cfx_count_ref.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'core/fxcrt') diff --git a/core/fxcrt/include/cfx_count_ref.h b/core/fxcrt/include/cfx_count_ref.h index cc7cf3d9ed..7dbd5dfe26 100644 --- a/core/fxcrt/include/cfx_count_ref.h +++ b/core/fxcrt/include/cfx_count_ref.h @@ -30,9 +30,6 @@ class CFX_CountRef { } void SetNull() { m_pObject.Reset(); } - bool IsNull() const { return !m_pObject; } - bool NotNull() const { return !IsNull(); } - const ObjClass* GetObject() const { return m_pObject.Get(); } template @@ -48,6 +45,7 @@ class CFX_CountRef { return m_pObject == that.m_pObject; } bool operator!=(const CFX_CountRef& that) const { return !(*this == that); } + operator bool() const { return m_pObject; } protected: class CountedObj : public ObjClass { -- cgit v1.2.3