diff options
author | tsepez <tsepez@chromium.org> | 2016-08-26 14:56:39 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-26 14:56:39 -0700 |
commit | 83d2351fd64128156c9abfb70266133d58a5e525 (patch) | |
tree | b975e59ff6a31fbe86b289294fe65f9150e18fb6 /core/fxcrt | |
parent | 0ee35908e906922a423fb18d7085ef80d0d8d8c8 (diff) | |
download | pdfium-83d2351fd64128156c9abfb70266133d58a5e525.tar.xz |
Remove CFX_CountRef::IsNull in favor of operator bool
Review-Url: https://codereview.chromium.org/2285513002
Diffstat (limited to 'core/fxcrt')
-rw-r--r-- | core/fxcrt/include/cfx_count_ref.h | 4 |
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 { |