aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/SkTemplates.h
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2016-11-03 14:40:50 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-03 19:03:40 +0000
commit145dbcd165d9d27298eb8888bc240e2d06a95464 (patch)
tree461ac2a3fe607bdf1d72fd72ae9451a58490a1bc /include/private/SkTemplates.h
parentb1c7f88df9ec40b4efb52d314304adfbaf95697c (diff)
Remove SkAutoTDelete.
Replace with std::unique_ptr. Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176 Reviewed-on: https://skia-review.googlesource.com/4381 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'include/private/SkTemplates.h')
-rw-r--r--include/private/SkTemplates.h22
1 files changed, 0 insertions, 22 deletions
diff --git a/include/private/SkTemplates.h b/include/private/SkTemplates.h
index 4c72897a02..5c6403d509 100644
--- a/include/private/SkTemplates.h
+++ b/include/private/SkTemplates.h
@@ -81,28 +81,6 @@ public:
operator T*() const { return this->get(); }
};
-/** \class SkAutoTDelete
- An SkAutoTDelete<T> is like a T*, except that the destructor of SkAutoTDelete<T>
- automatically deletes the pointer it holds (if any). That is, SkAutoTDelete<T>
- owns the T object that it points to. Like a T*, an SkAutoTDelete<T> may hold
- either NULL or a pointer to a T object. Also like T*, SkAutoTDelete<T> is
- thread-compatible, and once you dereference it, you get the threadsafety
- guarantees of T.
-
- 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) {}
-
- operator T*() const { return this->get(); }
-
-#if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)
- // Need to update graphics/BitmapRegionDecoder.cpp.
- T* detach() { return this->release(); }
-#endif
-};
-
/** Allocate an array of T elements, and free the array in the destructor
*/
template <typename T> class SkAutoTArray : SkNoncopyable {