commit | 89bd99bed85083c736390f3e340fd30be350d461 | [log] [tgz] |
---|---|---|
author | halcanary <halcanary@google.com> | Wed Mar 02 08:21:39 2016 -0800 |
committer | Commit bot <commit-bot@chromium.org> | Wed Mar 02 08:21:39 2016 -0800 |
tree | 5c421cabe601fb6f13636de4da083059af367201 | |
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
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h index 02df993..cea72cd 100644 --- a/include/core/SkRefCnt.h +++ b/include/core/SkRefCnt.h
@@ -316,7 +316,11 @@ 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; }