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

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

Issue 2324733003: explicit operator bool for CFX_RetainPtr and CFX_CountRef (Closed)
Patch Set: Created 4 years, 3 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/fxcrt/cfx_retain_ptr_unittest.cpp ('k') | core/fxcrt/include/cfx_retain_ptr.h » ('j') | 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 95132a73ca0e34983199c12fb878d2944fdf062a..d709efb67c0c9d1d64554d507ad0892ec3063c4b 100644
--- a/core/fxcrt/include/cfx_count_ref.h
+++ b/core/fxcrt/include/cfx_count_ref.h
@@ -47,7 +47,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; }
+ explicit operator bool() const { return !!m_pObject; }
private:
class CountedObj : public ObjClass {
« no previous file with comments | « core/fxcrt/cfx_retain_ptr_unittest.cpp ('k') | core/fxcrt/include/cfx_retain_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698