Merge "Use std::unique_ptr instead of UniquePtr." am: 0f61f86870
am: 0c69e9f271
* commit '0c69e9f271d05271b1deceb03ef6248a6805c193':
Use std::unique_ptr instead of UniquePtr.
This commit is contained in:
commit
40f76c2fed
2 changed files with 5 additions and 5 deletions
|
|
@ -17,10 +17,9 @@
|
||||||
#ifndef ANDROID_UTILS_LRU_CACHE_H
|
#ifndef ANDROID_UTILS_LRU_CACHE_H
|
||||||
#define ANDROID_UTILS_LRU_CACHE_H
|
#define ANDROID_UTILS_LRU_CACHE_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
#include <UniquePtr.h>
|
|
||||||
|
|
||||||
#include "utils/TypeHelpers.h" // hash_t
|
#include "utils/TypeHelpers.h" // hash_t
|
||||||
|
|
||||||
namespace android {
|
namespace android {
|
||||||
|
|
@ -91,7 +90,7 @@ private:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
UniquePtr<LruCacheSet> mSet;
|
std::unique_ptr<LruCacheSet> mSet;
|
||||||
OnEntryRemoved<TKey, TValue>* mListener;
|
OnEntryRemoved<TKey, TValue>* mListener;
|
||||||
Entry* mOldest;
|
Entry* mOldest;
|
||||||
Entry* mYoungest;
|
Entry* mYoungest;
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,12 @@
|
||||||
|
|
||||||
#define LOG_TAG "CallStack"
|
#define LOG_TAG "CallStack"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <utils/CallStack.h>
|
#include <utils/CallStack.h>
|
||||||
#include <utils/Printer.h>
|
#include <utils/Printer.h>
|
||||||
#include <utils/Errors.h>
|
#include <utils/Errors.h>
|
||||||
#include <utils/Log.h>
|
#include <utils/Log.h>
|
||||||
#include <UniquePtr.h>
|
|
||||||
|
|
||||||
#include <backtrace/Backtrace.h>
|
#include <backtrace/Backtrace.h>
|
||||||
|
|
||||||
|
|
@ -40,7 +41,7 @@ CallStack::~CallStack() {
|
||||||
void CallStack::update(int32_t ignoreDepth, pid_t tid) {
|
void CallStack::update(int32_t ignoreDepth, pid_t tid) {
|
||||||
mFrameLines.clear();
|
mFrameLines.clear();
|
||||||
|
|
||||||
UniquePtr<Backtrace> backtrace(Backtrace::Create(BACKTRACE_CURRENT_PROCESS, tid));
|
std::unique_ptr<Backtrace> backtrace(Backtrace::Create(BACKTRACE_CURRENT_PROCESS, tid));
|
||||||
if (!backtrace->Unwind(ignoreDepth)) {
|
if (!backtrace->Unwind(ignoreDepth)) {
|
||||||
ALOGW("%s: Failed to unwind callstack.", __FUNCTION__);
|
ALOGW("%s: Failed to unwind callstack.", __FUNCTION__);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue