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

Unified Diff: core/fxcrt/cfx_retain_ptr_unittest.cpp

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 | « no previous file | core/fxcrt/include/cfx_count_ref.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/cfx_retain_ptr_unittest.cpp
diff --git a/core/fxcrt/cfx_retain_ptr_unittest.cpp b/core/fxcrt/cfx_retain_ptr_unittest.cpp
index 4e74e52768fa1e19237261b3c4193600bafe2441..9da0d5ccf8ccf6bbb6bf8ccbda4e8c207004562a 100644
--- a/core/fxcrt/cfx_retain_ptr_unittest.cpp
+++ b/core/fxcrt/cfx_retain_ptr_unittest.cpp
@@ -208,8 +208,8 @@ TEST(fxcrt, RetainPtrBool) {
PseudoRetainable obj1;
CFX_RetainPtr<PseudoRetainable> null_ptr;
CFX_RetainPtr<PseudoRetainable> obj1_ptr(&obj1);
- bool null_bool = null_ptr;
- bool obj1_bool = obj1_ptr;
+ bool null_bool = !!null_ptr;
+ bool obj1_bool = !!obj1_ptr;
EXPECT_FALSE(null_bool);
EXPECT_TRUE(obj1_bool);
}
« no previous file with comments | « no previous file | core/fxcrt/include/cfx_count_ref.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698