Skip to content

Commit 6f61407

Browse files
codebyteretargos
authored andcommitted
src: make debug_options getters public
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]>
1 parent f76f143 commit 6f61407

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/node_options-inl.h

-8
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ PerIsolateOptions* PerProcessOptions::get_per_isolate_options() {
1313
return per_isolate.get();
1414
}
1515

16-
DebugOptions* EnvironmentOptions::get_debug_options() {
17-
return &debug_options_;
18-
}
19-
20-
const DebugOptions& EnvironmentOptions::debug_options() const {
21-
return debug_options_;
22-
}
23-
2416
EnvironmentOptions* PerIsolateOptions::get_per_env_options() {
2517
return per_env.get();
2618
}

src/node_options.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,9 @@ class EnvironmentOptions : public Options {
170170

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

173-
inline DebugOptions* get_debug_options();
174-
inline const DebugOptions& debug_options() const;
173+
inline DebugOptions* get_debug_options() { return &debug_options_; }
174+
inline const DebugOptions& debug_options() const { return debug_options_; }
175+
175176
void CheckOptions(std::vector<std::string>* errors) override;
176177

177178
private:

0 commit comments

Comments
 (0)