aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkRefCnt.h
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2016-03-02 08:21:39 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-02 08:21:39 -0800
commit89bd99bed85083c736390f3e340fd30be350d461 (patch)
tree5c421cabe601fb6f13636de4da083059af367201 /include/core/SkRefCnt.h
parent40ee60cee1d9e225263e70cd3372de6010c98a4f (diff)
sk_sp: remove explicit operator bool()
Diffstat (limited to 'include/core/SkRefCnt.h')
-rw-r--r--include/core/SkRefCnt.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index 02df993261..cea72cda66 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -316,7 +316,11 @@ public:
template <typename U>
bool operator!=(const sk_sp<U>& 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; }