diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2023-07-07 17:32:54 -0400 |
---|---|---|
committer | Ryan Ofsky <ryan@ofsky.org> | 2023-12-04 15:39:15 -0400 |
commit | 213542b625a6a4885fcbdfe236629a5f381eeb05 (patch) | |
tree | fe10697e9196bd5546c372766f74f8fe84182cbe /src/init.cpp | |
parent | feeb7b816affa790e02e7ba0780c4ef33d2310ff (diff) |
refactor: Add InitContext function to initialize NodeContext with global pointers
Having InitContext() avoids the need to add duplicate code to src/init/*.cpp
files in the next commit. It also lets these files avoid referencing global
variables like gArgs.
There is no change in behavior in this commit.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index 11679f2e4a..cbef3c7db8 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -192,6 +192,10 @@ static void RemovePidFile(const ArgsManager& args) } } +void InitContext(NodeContext& node) +{ + node.args = &gArgs; +} ////////////////////////////////////////////////////////////////////////////// // |