aboutsummaryrefslogtreecommitdiff
path: root/src/util/system.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-07-27 10:48:25 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-07-27 15:05:14 +0300
commit1b4b9422cad28d1bead24ff5fd472536954cfaf9 (patch)
tree32600f1aff34a01617d445fd598fb1b15099bf2e /src/util/system.cpp
parent265c1b58d89b7b6fb30468ba402d7f75cc59a510 (diff)
scripted-diff: Use Flags enum in AddArg()
-BEGIN VERIFY SCRIPT- sed -i 's/const bool debug_only,/unsigned int flags, &/' src/util/system.h src/util/system.cpp sed -i -E 's/(true|false), OptionsCategory::/ArgsManager::ALLOW_ANY, &/' $(git grep --files-with-matches 'AddArg(' src) -END VERIFY SCRIPT-
Diffstat (limited to 'src/util/system.cpp')
-rw-r--r--src/util/system.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp
index 155809c220..c80536ec41 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -539,7 +539,7 @@ void ArgsManager::ForceSetArg(const std::string& strArg, const std::string& strV
m_override_args[strArg] = {strValue};
}
-void ArgsManager::AddArg(const std::string& name, const std::string& help, const bool debug_only, const OptionsCategory& cat)
+void ArgsManager::AddArg(const std::string& name, const std::string& help, unsigned int flags, const bool debug_only, const OptionsCategory& cat)
{
// Split arg name from its help param
size_t eq_index = name.find('=');
@@ -556,7 +556,7 @@ void ArgsManager::AddArg(const std::string& name, const std::string& help, const
void ArgsManager::AddHiddenArgs(const std::vector<std::string>& names)
{
for (const std::string& name : names) {
- AddArg(name, "", false, OptionsCategory::HIDDEN);
+ AddArg(name, "", ArgsManager::ALLOW_ANY, false, OptionsCategory::HIDDEN);
}
}
@@ -636,7 +636,7 @@ bool HelpRequested(const ArgsManager& args)
void SetupHelpOptions(ArgsManager& args)
{
- args.AddArg("-?", "Print this help message and exit", false, OptionsCategory::OPTIONS);
+ args.AddArg("-?", "Print this help message and exit", ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS);
args.AddHiddenArgs({"-h", "-help"});
}