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
This commit is contained in:
halcanary 2016-03-02 08:21:39 -08:00 committed by Commit bot
parent 40ee60cee1
commit 89bd99bed8

View File

@ -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; }