Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(788)

Unified Diff: core/fxcrt/include/cfx_count_ref.h

Issue 2285513002: Remove CFX_CountRef::IsNull in favor of operator bool (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@retain_again
Patch Set: Rebase, FX_BOOL Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/include/cfx_count_ref.h
diff --git a/core/fxcrt/include/cfx_count_ref.h b/core/fxcrt/include/cfx_count_ref.h
index cc7cf3d9ed22db13088b575a5f03900d4df4cec0..7dbd5dfe2686ba1e505146d67e148f59a891e68a 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 {
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698