From 77e585657fcf5567966867a4e1cf2271f276731b Mon Sep 17 00:00:00 2001 From: Alena Khineika Date: Tue, 26 Jul 2022 15:03:27 +0200 Subject: [PATCH] src: turn embedder api overload into default argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/43629 Reviewed-By: Anna Henningsen Reviewed-By: Antoine du Hamel Reviewed-By: Tobias Nießen Reviewed-By: Chengzhong Wu Reviewed-By: Colin Ihrig Reviewed-By: Minwoo Jung Reviewed-By: Darshan Sen Reviewed-By: Feng Yu --- src/node.cc | 7 ------- src/node.h | 7 +------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/node.cc b/src/node.cc index 4e03498e57f468..69a4904850cd76 100644 --- a/src/node.cc +++ b/src/node.cc @@ -862,13 +862,6 @@ int ProcessGlobalArgs(std::vector* args, static std::atomic_bool init_called{false}; -int InitializeNodeWithArgs(std::vector* argv, - std::vector* exec_argv, - std::vector* errors) { - return InitializeNodeWithArgs(argv, exec_argv, errors, - ProcessFlags::kNoFlags); -} - int InitializeNodeWithArgs(std::vector* argv, std::vector* exec_argv, std::vector* errors, diff --git a/src/node.h b/src/node.h index e866fcd9369a5c..3191be716cda99 100644 --- a/src/node.h +++ b/src/node.h @@ -250,16 +250,11 @@ NODE_EXTERN int Stop(Environment* env); // from argv, fill exec_argv, and possibly add errors resulting from parsing // the arguments to `errors`. The return value is a suggested exit code for the // program; If it is 0, then initializing Node.js succeeded. -NODE_EXTERN int InitializeNodeWithArgs( - std::vector* argv, - std::vector* exec_argv, - std::vector* errors); -// TODO(zcbenz): Turn above overloaded version into below's default argument. NODE_EXTERN int InitializeNodeWithArgs( std::vector* argv, std::vector* exec_argv, std::vector* errors, - ProcessFlags::Flags flags); + ProcessFlags::Flags flags = ProcessFlags::kNoFlags); enum OptionEnvvarSettings { kAllowedInEnvironment,