aboutsummaryrefslogtreecommitdiff
path: root/args.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'args.hxx')
-rw-r--r--args.hxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/args.hxx b/args.hxx
index 859a210..21dd433 100644
--- a/args.hxx
+++ b/args.hxx
@@ -1374,6 +1374,11 @@ namespace args
const std::string &Help() const
{ return help; }
+ /** If value is true, parser will fail if no command was parsed.
+ */
+ void RequireCommand(bool value)
+ { commandIsRequired = value; }
+
virtual bool IsGroup() const override
{ return false; }
@@ -1396,11 +1401,6 @@ namespace args
}
}
- void RequireCommand(bool value)
- {
- commandIsRequired = value;
- }
-
virtual FlagBase *Match(const EitherFlag &flag) override
{
if (selectedCommand != nullptr)