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

Unified Diff: include/core/SkRefCnt.h

Issue 1757593005: sk_sp: remove explicit operator bool() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: operator!() Created 4 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkRefCnt.h
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index 43251d0788c2e6a992965da626729da035d9e165..fea146d35f6536af78a11bcb87b3f63191b12bbb 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -295,7 +295,11 @@ public:
bool operator==(const sk_sp<T>& that) const { return this->get() == that.get(); }
bool operator!=(const sk_sp<T>& that) const { return this->get() != that.get(); }
- explicit operator bool() const { return this->get() != nullptr; }
+ // MSVC 2013 does not work correctly with explicit operator bool.
+ // https://chromium-cpp.appspot.com/#core-blacklist
+ //explicit operator bool() const { return this->get() != nullptr; }
+
+ bool operator!() const { return this->get() == nullptr; }
T* get() const { return fPtr; }
T* operator->() const { return fPtr; }
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698