aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/SkTemplates.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@google.com>2015-11-23 09:19:37 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-23 09:19:37 -0800
commitdfd7d48ced44026aafca71ecb5f0138af8125b94 (patch)
treea4ba8888c8d044487221f4a10cd21d389b591c6c /include/private/SkTemplates.h
parent06189155d987db5c7e69015f6ea87c2168d6a065 (diff)
Revert of skstd -> std for unique_ptr (patchset #16 id:300001 of https://codereview.chromium.org/1436033003/ )
Reason for revert: Perf-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release has not updated yet. Original issue's description: > skstd -> std for unique_ptr > > TBR=reed@google.com > No public API changes. > > BUG=skia:4564 > > Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50 > > CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot > > Committed: https://skia.googlesource.com/skia/+/06189155d987db5c7e69015f6ea87c2168d6a065 TBR=bungeman@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4564 Review URL: https://codereview.chromium.org/1467333002
Diffstat (limited to 'include/private/SkTemplates.h')
-rw-r--r--include/private/SkTemplates.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/private/SkTemplates.h b/include/private/SkTemplates.h
index db85fbc3dd..533cb264d1 100644
--- a/include/private/SkTemplates.h
+++ b/include/private/SkTemplates.h
@@ -13,9 +13,9 @@
#include "SkMath.h"
#include "SkTLogic.h"
#include "SkTypes.h"
+#include "SkUniquePtr.h"
#include "SkUtility.h"
#include <limits.h>
-#include <memory>
#include <new>
/** \file SkTemplates.h
@@ -59,9 +59,9 @@ template <typename R, typename T, R (*P)(T*)> struct SkFunctionWrapper {
function.
*/
template <typename T, void (*P)(T*)> class SkAutoTCallVProc
- : public std::unique_ptr<T, SkFunctionWrapper<void, T, P>> {
+ : public skstd::unique_ptr<T, SkFunctionWrapper<void, T, P>> {
public:
- SkAutoTCallVProc(T* obj): std::unique_ptr<T, SkFunctionWrapper<void, T, P>>(obj) {}
+ SkAutoTCallVProc(T* obj): skstd::unique_ptr<T, SkFunctionWrapper<void, T, P>>(obj) {}
operator T*() const { return this->get(); }
T* detach() { return this->release(); }
@@ -76,9 +76,9 @@ reference is null when the destructor is called, we do not call the
function.
*/
template <typename T, int (*P)(T*)> class SkAutoTCallIProc
- : public std::unique_ptr<T, SkFunctionWrapper<int, T, P>> {
+ : public skstd::unique_ptr<T, SkFunctionWrapper<int, T, P>> {
public:
- SkAutoTCallIProc(T* obj): std::unique_ptr<T, SkFunctionWrapper<int, T, P>>(obj) {}
+ SkAutoTCallIProc(T* obj): skstd::unique_ptr<T, SkFunctionWrapper<int, T, P>>(obj) {}
operator T*() const { return this->get(); }
T* detach() { return this->release(); }
@@ -94,18 +94,18 @@ public:
The size of a SkAutoTDelete is small: sizeof(SkAutoTDelete<T>) == sizeof(T*)
*/
-template <typename T> class SkAutoTDelete : public std::unique_ptr<T> {
+template <typename T> class SkAutoTDelete : public skstd::unique_ptr<T> {
public:
- SkAutoTDelete(T* obj = NULL) : std::unique_ptr<T>(obj) {}
+ SkAutoTDelete(T* obj = NULL) : skstd::unique_ptr<T>(obj) {}
operator T*() const { return this->get(); }
void free() { this->reset(nullptr); }
T* detach() { return this->release(); }
};
-template <typename T> class SkAutoTDeleteArray : public std::unique_ptr<T[]> {
+template <typename T> class SkAutoTDeleteArray : public skstd::unique_ptr<T[]> {
public:
- SkAutoTDeleteArray(T array[]) : std::unique_ptr<T[]>(array) {}
+ SkAutoTDeleteArray(T array[]) : skstd::unique_ptr<T[]>(array) {}
void free() { this->reset(nullptr); }
T* detach() { return this->release(); }