Now we have a proper C++ library, use std::unique_ptr.
Also remove the Android.libcxx.mk and other bits of stlport compatibility
mechanics.
Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61
diff --git a/runtime/dex_file_test.cc b/runtime/dex_file_test.cc
index 86c282e..a814c34 100644
--- a/runtime/dex_file_test.cc
+++ b/runtime/dex_file_test.cc
@@ -16,7 +16,8 @@
#include "dex_file.h"
-#include "UniquePtrCompat.h"
+#include <memory>
+
#include "common_runtime_test.h"
namespace art {
@@ -90,7 +91,7 @@
*dst_size = 0;
return nullptr;
}
- UniquePtr<byte[]> dst(new byte[tmp.size()]);
+ std::unique_ptr<byte[]> dst(new byte[tmp.size()]);
if (dst_size != nullptr) {
*dst_size = tmp.size();
} else {
@@ -131,11 +132,11 @@
// decode base64
CHECK(base64 != NULL);
size_t length;
- UniquePtr<byte[]> dex_bytes(DecodeBase64(base64, &length));
+ std::unique_ptr<byte[]> dex_bytes(DecodeBase64(base64, &length));
CHECK(dex_bytes.get() != NULL);
// write to provided file
- UniquePtr<File> file(OS::CreateEmptyFile(location));
+ std::unique_ptr<File> file(OS::CreateEmptyFile(location));
CHECK(file.get() != NULL);
if (!file->WriteFully(dex_bytes.get(), length)) {
PLOG(FATAL) << "Failed to write base64 as dex file";
@@ -154,7 +155,7 @@
TEST_F(DexFileTest, Header) {
ScratchFile tmp;
- UniquePtr<const DexFile> raw(OpenDexFileBase64(kRawDex, tmp.GetFilename().c_str()));
+ std::unique_ptr<const DexFile> raw(OpenDexFileBase64(kRawDex, tmp.GetFilename().c_str()));
ASSERT_TRUE(raw.get() != NULL);
const DexFile::Header& header = raw->GetHeader();