Switch UniquePtr to std::unique_ptr.

Bug: 21209050
Change-Id: I91d4c44de479b37f2729382fcdf103b8c69aa668
(cherry picked from commit 6e96403b8f)
This commit is contained in:
Christopher Ferris 2015-05-15 17:30:21 -07:00
parent 2d543b7d4b
commit f0861f9f8f
2 changed files with 9 additions and 9 deletions

View file

@ -28,10 +28,11 @@
#include <sys/types.h>
#include <sys/ptrace.h>
#include <memory>
#include <backtrace/Backtrace.h>
#include <log/log.h>
#include <UniquePtr.h>
#include "backtrace.h"
@ -96,7 +97,7 @@ static void dump_thread(
return;
}
UniquePtr<Backtrace> backtrace(Backtrace::Create(tid, BACKTRACE_CURRENT_THREAD));
std::unique_ptr<Backtrace> backtrace(Backtrace::Create(tid, BACKTRACE_CURRENT_THREAD));
if (backtrace->Unwind(0)) {
dump_backtrace_to_log(backtrace.get(), log, " ");
} else {

View file

@ -32,6 +32,9 @@
#include <sys/stat.h>
#include <sys/un.h>
#include <memory>
#include <string>
#include <private/android_filesystem_config.h>
#include <base/stringprintf.h>
@ -45,10 +48,6 @@
#include <selinux/android.h>
#include <UniquePtr.h>
#include <string>
#include "backtrace.h"
#include "elf_utils.h"
#include "machine.h"
@ -445,7 +444,7 @@ static bool dump_sibling_thread_report(
dump_thread_info(log, pid, new_tid);
dump_registers(log, new_tid);
UniquePtr<Backtrace> backtrace(Backtrace::Create(pid, new_tid, map));
std::unique_ptr<Backtrace> backtrace(Backtrace::Create(pid, new_tid, map));
if (backtrace->Unwind(0)) {
dump_backtrace_and_stack(backtrace.get(), log);
} else {
@ -646,8 +645,8 @@ static bool dump_crash(log_t* log, pid_t pid, pid_t tid, int signal, int si_code
dump_signal_info(log, tid, signal, si_code);
}
UniquePtr<BacktraceMap> map(BacktraceMap::Create(pid));
UniquePtr<Backtrace> backtrace(Backtrace::Create(pid, tid, map.get()));
std::unique_ptr<BacktraceMap> map(BacktraceMap::Create(pid));
std::unique_ptr<Backtrace> backtrace(Backtrace::Create(pid, tid, map.get()));
dump_abort_message(backtrace.get(), log, abort_msg_address);
dump_registers(log, tid);
if (backtrace->Unwind(0)) {