diff options
author | 2015-11-16 12:57:52 -0800 | |
---|---|---|
committer | 2015-11-16 12:57:52 -0800 | |
commit | 755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50 (patch) | |
tree | ac840c6a57ece6066e8d6a5b16e780096ab4268f /include/private/SkTemplates.h | |
parent | 56da02502019cfbb817898e37e320539b9838e2b (diff) |
skstd -> std for unique_ptr
TBR=reed@google.com
No public API changes.
BUG=skia:4564
Review URL: https://codereview.chromium.org/1436033003
Diffstat (limited to 'include/private/SkTemplates.h')
-rw-r--r-- | include/private/SkTemplates.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/private/SkTemplates.h b/include/private/SkTemplates.h index 533cb264d1..db85fbc3dd 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 skstd::unique_ptr<T, SkFunctionWrapper<void, T, P>> { + : public std::unique_ptr<T, SkFunctionWrapper<void, T, P>> { public: - SkAutoTCallVProc(T* obj): skstd::unique_ptr<T, SkFunctionWrapper<void, T, P>>(obj) {} + SkAutoTCallVProc(T* obj): std::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 skstd::unique_ptr<T, SkFunctionWrapper<int, T, P>> { + : public std::unique_ptr<T, SkFunctionWrapper<int, T, P>> { public: - SkAutoTCallIProc(T* obj): skstd::unique_ptr<T, SkFunctionWrapper<int, T, P>>(obj) {} + SkAutoTCallIProc(T* obj): std::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 skstd::unique_ptr<T> { +template <typename T> class SkAutoTDelete : public std::unique_ptr<T> { public: - SkAutoTDelete(T* obj = NULL) : skstd::unique_ptr<T>(obj) {} + SkAutoTDelete(T* obj = NULL) : std::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 skstd::unique_ptr<T[]> { +template <typename T> class SkAutoTDeleteArray : public std::unique_ptr<T[]> { public: - SkAutoTDeleteArray(T array[]) : skstd::unique_ptr<T[]>(array) {} + SkAutoTDeleteArray(T array[]) : std::unique_ptr<T[]>(array) {} void free() { this->reset(nullptr); } T* detach() { return this->release(); } |