Skip to content

Commit

Permalink
Merge #20092: util: Do not use gArgs global in ArgsManager member fun…
Browse files Browse the repository at this point in the history
…ctions

d103484 util: Do not use gArgs global in ArgsManager member functions (Hennadii Stepanov)

Pull request description:

ACKs for top commit:
  practicalswift:
    ACK d103484: patch looks correct

Tree-SHA512: dda7a5062363170c6995f2fd8fda48c0a919e5ca67be9faa8f0fa66f9d3b535f134eb6f4860a0859bc5457c02230b34a8d1264045f22bed8d30668158ac2271f
  • Loading branch information
MarcoFalke committed Oct 7, 2020
2 parents db88db4 + d103484 commit 283a73d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ void ArgsManager::AddHiddenArgs(const std::vector<std::string>& 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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 283a73d

Please sign in to comment.