Changed: Invert version and help checks
This commit is contained in:
parent
bb8b94d7ad
commit
1c5c3a8b3c
1 changed files with 7 additions and 7 deletions
|
@ -321,13 +321,6 @@ bool CCmdArgs::parse(const std::vector<std::string> &argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// process help if requested or if required arguments are missing
|
|
||||||
if (haveLongArg("help") || (needRequiredArg() && !haveRequiredArg()))
|
|
||||||
{
|
|
||||||
displayHelp();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// process version
|
// process version
|
||||||
if (haveLongArg("version"))
|
if (haveLongArg("version"))
|
||||||
{
|
{
|
||||||
|
@ -335,6 +328,13 @@ bool CCmdArgs::parse(const std::vector<std::string> &argv)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// process help if requested or if required arguments are missing
|
||||||
|
if (haveLongArg("help") || (needRequiredArg() && !haveRequiredArg()))
|
||||||
|
{
|
||||||
|
displayHelp();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue