From d103484fe81a8a5bf1d692f3f7d1c0ef1be5f63c Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 6 Oct 2020 14:36:50 +0300 Subject: [PATCH] util: Do not use gArgs global in ArgsManager member functions --- src/util/system.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/system.cpp b/src/util/system.cpp index 41715aac1a..a411b73a16 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -523,7 +523,7 @@ void ArgsManager::AddHiddenArgs(const std::vector& names) std::string ArgsManager::GetHelpMessage() const { - const bool show_debug = gArgs.GetBoolArg("-help-debug", false); + const bool show_debug = GetBoolArg("-help-debug", false); std::string usage = ""; LOCK(cs_args); @@ -900,7 +900,7 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys) // If datadir is changed in .conf file: ClearDatadirCache(); if (!CheckDataDirOption()) { - error = strprintf("specified data directory \"%s\" does not exist.", gArgs.GetArg("-datadir", "")); + error = strprintf("specified data directory \"%s\" does not exist.", GetArg("-datadir", "")); return false; } return true;