Switch to UniquePtr.
Only one use of scoped_ptr was incorrect (but then again, I spent an afternoon
with valgrind finding and fixing them just last week).
Change-Id: If5ec1c8aa0794a4f652bfd1c0fffccf95facdc40
diff --git a/src/object_bitmap.cc b/src/object_bitmap.cc
index 40dd41d..ae67ee5 100644
--- a/src/object_bitmap.cc
+++ b/src/object_bitmap.cc
@@ -16,13 +16,13 @@
#include <sys/mman.h>
+#include "UniquePtr.h"
#include "logging.h"
-#include "scoped_ptr.h"
namespace art {
HeapBitmap* HeapBitmap::Create(byte* base, size_t length) {
- scoped_ptr<HeapBitmap> bitmap(new HeapBitmap(base, length));
+ UniquePtr<HeapBitmap> bitmap(new HeapBitmap(base, length));
if (!bitmap->Init(base, length)) {
return NULL;
} else {
@@ -37,7 +37,7 @@
CHECK(base != NULL);
size_t length = HB_OFFSET_TO_INDEX(max_size) * kWordSize;
mem_map_.reset(MemMap::Map(length, PROT_READ | PROT_WRITE));
- if (mem_map_ == NULL) {
+ if (mem_map_.get() == NULL) {
return false;
}
words_ = reinterpret_cast<word*>(mem_map_->GetAddress());