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/utils.cc b/src/utils.cc
index b908c4d..f957580 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -1,6 +1,7 @@
// Copyright 2011 Google Inc. All Rights Reserved.
// Author: enh@google.com (Elliott Hughes)
+#include "UniquePtr.h"
#include "file.h"
#include "object.h"
#include "os.h"
@@ -9,8 +10,8 @@
namespace art {
std::string ReadFileToString(const char* file_name) {
- scoped_ptr<File> file(OS::OpenFile(file_name, false));
- CHECK(file != NULL);
+ UniquePtr<File> file(OS::OpenFile(file_name, false));
+ CHECK(file.get() != NULL);
std::string contents;
char buf[8 * KB];