diff --git a/src/util/system.h b/src/util/system.h --- a/src/util/system.h +++ b/src/util/system.h @@ -285,12 +285,12 @@ /** * Get the help string */ - std::string GetHelpMessage(); + std::string GetHelpMessage() const; /** * Check whether we know of this arg */ - bool IsArgKnown(const std::string &key, std::string &error); + bool IsArgKnown(const std::string &key) const; }; extern ArgsManager gArgs; diff --git a/src/util/system.cpp b/src/util/system.cpp --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -483,7 +483,7 @@ // Check that the arg is known if (!(IsSwitchChar(key[0]) && key.size() == 1)) { - if (!IsArgKnown(key, error)) { + if (!IsArgKnown(key)) { error = strprintf("Invalid parameter %s", key.c_str()); return false; } @@ -506,7 +506,7 @@ return true; } -bool ArgsManager::IsArgKnown(const std::string &key, std::string &error) { +bool ArgsManager::IsArgKnown(const std::string &key) const { size_t option_index = key.find('.'); std::string arg_no_net; if (option_index == std::string::npos) { @@ -673,7 +673,7 @@ m_config_args.erase(strArg); } -std::string ArgsManager::GetHelpMessage() { +std::string ArgsManager::GetHelpMessage() const { const bool show_debug = gArgs.GetBoolArg("-help-debug", false); std::string usage = ""; @@ -950,7 +950,7 @@ } // Check that the arg is known - if (!IsArgKnown(strKey, error) && !ignore_invalid_keys) { + if (!IsArgKnown(strKey) && !ignore_invalid_keys) { error = strprintf("Invalid configuration value %s", option.first.c_str()); return false;