mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-29 13:32:33 +02:00
util: Do not use gArgs global in ArgsManager member functions
This commit is contained in:
parent
875e1ccc9f
commit
d103484fe8
@ -523,7 +523,7 @@ void ArgsManager::AddHiddenArgs(const std::vector<std::string>& names)
|
|||||||
|
|
||||||
std::string ArgsManager::GetHelpMessage() const
|
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 = "";
|
std::string usage = "";
|
||||||
LOCK(cs_args);
|
LOCK(cs_args);
|
||||||
@ -900,7 +900,7 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys)
|
|||||||
// If datadir is changed in .conf file:
|
// If datadir is changed in .conf file:
|
||||||
ClearDatadirCache();
|
ClearDatadirCache();
|
||||||
if (!CheckDataDirOption()) {
|
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 false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user