| Index: include/private/SkTemplates.h
|
| diff --git a/include/private/SkTemplates.h b/include/private/SkTemplates.h
|
| index db85fbc3dd10842fd0009353ba2e75d3b37ec57e..533cb264d163ee7354f1e53de7bac4a2de36cd61 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 @@
|
| function.
|
| */
|
| template <typename T, void (*P)(T*)> class SkAutoTCallVProc
|
| - : public std::unique_ptr<T, SkFunctionWrapper<void, T, P>> {
|
| -public:
|
| - SkAutoTCallVProc(T* obj): std::unique_ptr<T, SkFunctionWrapper<void, T, P>>(obj) {}
|
| + : public skstd::unique_ptr<T, SkFunctionWrapper<void, T, P>> {
|
| +public:
|
| + 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 @@
|
| function.
|
| */
|
| template <typename T, int (*P)(T*)> class SkAutoTCallIProc
|
| - : public std::unique_ptr<T, SkFunctionWrapper<int, T, P>> {
|
| -public:
|
| - SkAutoTCallIProc(T* obj): std::unique_ptr<T, SkFunctionWrapper<int, T, P>>(obj) {}
|
| + : public skstd::unique_ptr<T, SkFunctionWrapper<int, T, P>> {
|
| +public:
|
| + 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 @@
|
|
|
| The size of a SkAutoTDelete is small: sizeof(SkAutoTDelete<T>) == sizeof(T*)
|
| */
|
| -template <typename T> class SkAutoTDelete : public std::unique_ptr<T> {
|
| -public:
|
| - SkAutoTDelete(T* obj = NULL) : std::unique_ptr<T>(obj) {}
|
| +template <typename T> class SkAutoTDelete : public skstd::unique_ptr<T> {
|
| +public:
|
| + 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[]> {
|
| -public:
|
| - SkAutoTDeleteArray(T array[]) : std::unique_ptr<T[]>(array) {}
|
| +template <typename T> class SkAutoTDeleteArray : public skstd::unique_ptr<T[]> {
|
| +public:
|
| + SkAutoTDeleteArray(T array[]) : skstd::unique_ptr<T[]>(array) {}
|
|
|
| void free() { this->reset(nullptr); }
|
| T* detach() { return this->release(); }
|
|
|