From b386970d0750e368d6adc5d0c010ead329b5c7c1 Mon Sep 17 00:00:00 2001 From: Ben Woosley Date: Fri, 30 Mar 2018 13:47:36 -0700 Subject: [moveonly] Extract HelpRequested to dry up the help options testing This ensures consistency across interfaces and makes the version handling more clear. --- src/util.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/util.cpp') diff --git a/src/util.cpp b/src/util.cpp index 490897899b..46054f5025 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -584,7 +584,10 @@ void ArgsManager::ForceSetArg(const std::string& strArg, const std::string& strV mapMultiArgs[strArg] = {strValue}; } - +bool HelpRequested(const ArgsManager& args) +{ + return args.IsArgSet("-?") || args.IsArgSet("-h") || args.IsArgSet("-help"); +} static const int screenWidth = 79; static const int optIndent = 2; -- cgit v1.2.3