summaryrefslogtreecommitdiff
path: root/core/fxcrt/include/cfx_count_ref.h
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-08-26 14:56:39 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-26 14:56:39 -0700
commit83d2351fd64128156c9abfb70266133d58a5e525 (patch)
treeb975e59ff6a31fbe86b289294fe65f9150e18fb6 /core/fxcrt/include/cfx_count_ref.h
parent0ee35908e906922a423fb18d7085ef80d0d8d8c8 (diff)
downloadpdfium-83d2351fd64128156c9abfb70266133d58a5e525.tar.xz
Remove CFX_CountRef::IsNull in favor of operator bool
Review-Url: https://codereview.chromium.org/2285513002
Diffstat (limited to 'core/fxcrt/include/cfx_count_ref.h')
-rw-r--r--core/fxcrt/include/cfx_count_ref.h4
1 files changed, 1 insertions, 3 deletions
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 <typename... Args>
@@ -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 {