From 04cdc4b61879849df63e883e68eecafe6510f423 Mon Sep 17 00:00:00 2001 From: mtklein Date: Mon, 21 Mar 2016 09:35:33 -0700 Subject: [PATCH] Remove transitional explicit operator bool. These should no longer be necessary. Android's STL should now be sane. TBR=reed This just removes code. Review URL: https://codereview.chromium.org/1817153002 --- include/core/SkRefCnt.h | 4 ---- include/private/SkTemplates.h | 3 --- 2 files changed, 7 deletions(-) diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h index ce8662b..46d475e 100644 --- a/include/core/SkRefCnt.h +++ b/include/core/SkRefCnt.h @@ -200,10 +200,6 @@ public: // Need to update graphics/Shader.cpp. T* detach() { return this->release(); } #endif - - // Android's std::unique_ptr's operator bool() is sometimes not explicit... - // so override it with our own explcitly explicit version. - explicit operator bool() const { return this->get() != nullptr; } }; // Can't use the #define trick below to guard a bare SkAutoTUnref(...) because it's templated. :( diff --git a/include/private/SkTemplates.h b/include/private/SkTemplates.h index e8fbfd5..272b585 100644 --- a/include/private/SkTemplates.h +++ b/include/private/SkTemplates.h @@ -101,9 +101,6 @@ public: // Need to update graphics/BitmapRegionDecoder.cpp. T* detach() { return this->release(); } #endif - - // See SkAutoTUnref for why we do this. - explicit operator bool() const { return this->get() != nullptr; } }; template class SkAutoTDeleteArray : public std::unique_ptr { -- 2.7.4