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:
parent
375c7649ec
commit
9c753b3dc2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user