diff options
author | Dan Albert <danalbert@google.com> | 2014-11-05 10:02:36 -0800 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2014-11-05 10:53:26 -0800 |
commit | c250bc97079a841c3f2c3aa6679784dab7f7d16a (patch) | |
tree | 0cbb35525bbe4f113d67f63e69dc963f97e8e731 | |
parent | b99e26cde99d4dbdcc8411369d56c5c080526fcb (diff) | |
download | android_libnativehelper-c250bc97079a841c3f2c3aa6679784dab7f7d16a.tar.gz android_libnativehelper-c250bc97079a841c3f2c3aa6679784dab7f7d16a.tar.bz2 android_libnativehelper-c250bc97079a841c3f2c3aa6679784dab7f7d16a.zip |
Don't need swap anymore.
The declaration of std::swap here is inconsistent with the one in
libc++ (noexcept differences). Rather than worrying about keeping them
all consistent, just remove swap. It was only ever added for ART, and
ART now uses std::unique_ptr instead.
This was causing an ambiguous overload error in system/core.
Change-Id: I4cf4c41c5dda01a96915e8309af2f8be089d1a2a
-rw-r--r-- | include/nativehelper/UniquePtr.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/include/nativehelper/UniquePtr.h b/include/nativehelper/UniquePtr.h index 7890d52..ac88be1 100644 --- a/include/nativehelper/UniquePtr.h +++ b/include/nativehelper/UniquePtr.h @@ -20,11 +20,6 @@ #include <cstdlib> // For NULL. #include "JNIHelp.h" // For DISALLOW_COPY_AND_ASSIGN. -// This is a fake declaration of std::swap to avoid including <algorithm> -namespace std { -template <class T> void swap(T&, T&); -} - // Default deleter for pointer types. template <typename T> struct DefaultDelete { @@ -86,11 +81,6 @@ public: } } - // Swap with another unique pointer. - void swap(UniquePtr<T>& other) { - std::swap(mPtr, other.mPtr); - } - private: // The raw pointer. T* mPtr; |