From 4959def222d7e1ff2de0ed0280beb0ba3721c68e Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Thu, 19 Aug 2021 11:48:16 -0700 Subject: [PATCH] Remove usages of make_unique Building fails for some people because configure requires c++11 but make_unique is a c++14 feature. Change-Id: I23ce689fc92e9e90a95e7643ff29602f6b32ccbb Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3107784 Reviewed-by: Joshua Peraza --- src/common/dwarf_cu_to_module.cc | 6 +++--- src/processor/basic_source_line_resolver.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc index e3bd9414..c51514b7 100644 --- a/src/common/dwarf_cu_to_module.cc +++ b/src/common/dwarf_cu_to_module.cc @@ -766,9 +766,9 @@ void DwarfCUToModule::InlineHandler::Finish() { Module::InlineOrigin* origin = cu_context_->file_context->file_private_->inline_origin_map .GetOrCreateInlineOrigin(specification_offset_, name_); - unique_ptr in = std::make_unique( - origin, ranges, call_site_line_, inline_nest_level_, - std::move(child_inlines_)); + unique_ptr in( + new Module::Inline(origin, ranges, call_site_line_, inline_nest_level_, + std::move(child_inlines_))); inlines_.push_back(std::move(in)); } diff --git a/src/processor/basic_source_line_resolver.cc b/src/processor/basic_source_line_resolver.cc index 5d4c7621..79ae9965 100644 --- a/src/processor/basic_source_line_resolver.cc +++ b/src/processor/basic_source_line_resolver.cc @@ -258,7 +258,7 @@ int BasicSourceLineResolver::Module::ConstructInlineFrames( new_frame.trust = StackFrame::FRAME_TRUST_INLINE; // Must add frames before calling ConstructInlineFrames to get correct order. int current_idx = inlined_frames->size(); - inlined_frames->push_back(std::make_unique(new_frame)); + inlined_frames->push_back(unique_ptr(new StackFrame(new_frame))); int source_line = ConstructInlineFrames(&new_frame, address, in->child_inlines, inlined_frames); if (source_line != -1) {