Skip to content

Commit

Permalink
src: make debug_options getters public
Browse files Browse the repository at this point in the history
This simplifies requires for those using DebugOptions,
since debug_options was defined in src/node_options-inl.h  and thus
embedders would need to require an extra file to do what could
trivially be consolidated into one.

PR-URL: #30494
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: David Carlier <[email protected]>
  • Loading branch information
codebytere authored and MylesBorins committed Dec 17, 2019
1 parent 30e2d28 commit c43461a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
8 changes: 0 additions & 8 deletions src/node_options-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ PerIsolateOptions* PerProcessOptions::get_per_isolate_options() {
return per_isolate.get();
}

DebugOptions* EnvironmentOptions::get_debug_options() {
return &debug_options_;
}

const DebugOptions& EnvironmentOptions::debug_options() const {
return debug_options_;
}

EnvironmentOptions* PerIsolateOptions::get_per_env_options() {
return per_env.get();
}
Expand Down
5 changes: 3 additions & 2 deletions src/node_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,9 @@ class EnvironmentOptions : public Options {

std::vector<std::string> user_argv;

inline DebugOptions* get_debug_options();
inline const DebugOptions& debug_options() const;
inline DebugOptions* get_debug_options() { return &debug_options_; }
inline const DebugOptions& debug_options() const { return debug_options_; }

void CheckOptions(std::vector<std::string>* errors) override;

private:
Expand Down

0 comments on commit c43461a

Please sign in to comment.