0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

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>
This commit is contained in:
Yuhanun Citgez 2020-02-05 23:39:18 +01:00 committed by Anna Henningsen
parent 375c7649ec
commit 9c753b3dc2
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -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