diff options
author | Yuhanun Citgez <y.citgez@student.utwente.nl> | 2020-02-06 01:39:18 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-02-08 20:31:48 +0300 |
commit | 9c753b3dc2b465496a94d7ccffc3c9438c3ce325 (patch) | |
tree | abc75d36157867b79825c3bee9ade3e492058525 /src/debug_utils.cc | |
parent | 375c7649ec8a67aaf5524df762f221168716a523 (diff) |
src: modernized unique_ptr construction
PR-URL: https://github.com/nodejs/node/pull/31654
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Diffstat (limited to 'src/debug_utils.cc')
-rw-r--r-- | src/debug_utils.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/debug_utils.cc b/src/debug_utils.cc index 984c04eb2d3..4553b642b65 100644 --- a/src/debug_utils.cc +++ b/src/debug_utils.cc @@ -100,16 +100,14 @@ class PosixSymbolDebuggingContext final : public NativeSymbolDebuggingContext { std::unique_ptr<NativeSymbolDebuggingContext> NativeSymbolDebuggingContext::New() { - return std::unique_ptr<NativeSymbolDebuggingContext>( - new PosixSymbolDebuggingContext()); + return std::make_unique<PosixSymbolDebuggingContext>(); } #else // HAVE_EXECINFO_H std::unique_ptr<NativeSymbolDebuggingContext> NativeSymbolDebuggingContext::New() { - return std::unique_ptr<NativeSymbolDebuggingContext>( - new NativeSymbolDebuggingContext()); + return std::make_unique<NativeSymbolDebuggingContext>(); } #endif // HAVE_EXECINFO_H |