diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2018-03-30 13:47:36 -0700 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2018-04-02 15:42:06 -0700 |
commit | b386970d0750e368d6adc5d0c010ead329b5c7c1 (patch) | |
tree | ba225416f9a72ba87f9dd6f8fda1dc6ff975ce21 /src/util.cpp | |
parent | c564424d98b1561f16e633528172b3583719e5f3 (diff) |
[moveonly] Extract HelpRequested to dry up the help options testing
This ensures consistency across interfaces and makes the version handling more clear.
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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; |