diff options
author | 2016-03-02 08:21:39 -0800 | |
---|---|---|
committer | 2016-03-02 08:21:39 -0800 | |
commit | 89bd99bed85083c736390f3e340fd30be350d461 (patch) | |
tree | 5c421cabe601fb6f13636de4da083059af367201 /include/core/SkRefCnt.h | |
parent | 40ee60cee1d9e225263e70cd3372de6010c98a4f (diff) |
sk_sp: remove explicit operator bool()
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1757593005
Review URL: https://codereview.chromium.org/1757593005
Diffstat (limited to 'include/core/SkRefCnt.h')
-rw-r--r-- | include/core/SkRefCnt.h | 6 |
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; } |