aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkRefCnt.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@google.com>2016-03-10 11:31:27 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-10 11:31:27 -0800
commit977c07dad26fbb56f6d4b5fc1ac1a324d28bd693 (patch)
tree93016a3da1a43ada575ff1557716e97833f5a87d /include/core/SkRefCnt.h
parent7e6fcf890a1a63249136b8e6d9f4d5a606ef7508 (diff)
Revert of Use std::unique_ptr. (patchset #7 id:120001 of https://codereview.chromium.org/1780933003/ )
Reason for revert: Now we remember! The problem was Clank: https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/34329 Original issue's description: > Use std::unique_ptr. > > TBR=reed@google.com > > Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940 TBR=bungeman@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1782973002
Diffstat (limited to 'include/core/SkRefCnt.h')
-rw-r--r--include/core/SkRefCnt.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index 5e334395a9..f159e3b1b7 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -9,10 +9,9 @@
#define SkRefCnt_DEFINED
#include "../private/SkAtomics.h"
-#include "../private/SkTLogic.h"
+#include "../private/SkUniquePtr.h"
#include "SkTypes.h"
#include <functional>
-#include <memory>
#include <utility>
#define SK_SUPPORT_TRANSITION_TO_SP_INTERFACES
@@ -190,9 +189,9 @@ template <typename T> struct SkTUnref {
/**
* Utility class that simply unref's its argument in the destructor.
*/
-template <typename T> class SkAutoTUnref : public std::unique_ptr<T, SkTUnref<T>> {
+template <typename T> class SkAutoTUnref : public skstd::unique_ptr<T, SkTUnref<T>> {
public:
- explicit SkAutoTUnref(T* obj = nullptr) : std::unique_ptr<T, SkTUnref<T>>(obj) {}
+ explicit SkAutoTUnref(T* obj = nullptr) : skstd::unique_ptr<T, SkTUnref<T>>(obj) {}
T* detach() { return this->release(); }
operator T*() const { return this->get(); }