diff options
author | 2018-10-29 14:28:56 -0700 | |
---|---|---|
committer | 2018-10-29 14:39:24 -0700 | |
commit | c57c680b16eb4857eef16134a811f4c2ff9d95f0 (patch) | |
tree | 9527328cb8738878e1b727a48620769224dddb2c /runtime/native_stack_dump.cc | |
parent | ce2a00daa92670a4fc01ef59fdbc3769a846f69c (diff) |
Modernise code to use std::make_unique
Generated by clang-tidy.
Test: m checkbuild
Change-Id: Idb24960d9326c0d94ab5d04b18deb0894d23da9f
Diffstat (limited to 'runtime/native_stack_dump.cc')
-rw-r--r-- | runtime/native_stack_dump.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/native_stack_dump.cc b/runtime/native_stack_dump.cc index ce295aacde..10f589831f 100644 --- a/runtime/native_stack_dump.cc +++ b/runtime/native_stack_dump.cc @@ -16,6 +16,7 @@ #include "native_stack_dump.h" +#include <memory> #include <ostream> #include <stdio.h> @@ -128,10 +129,10 @@ static std::unique_ptr<Addr2linePipe> Connect(const std::string& name, const cha } else { close(caller_to_addr2line[0]); close(addr2line_to_caller[1]); - return std::unique_ptr<Addr2linePipe>(new Addr2linePipe(addr2line_to_caller[0], - caller_to_addr2line[1], - name, - pid)); + return std::make_unique<Addr2linePipe>(addr2line_to_caller[0], + caller_to_addr2line[1], + name, + pid); } } |