From 1c5c3a8b3c3da12f3ad626a3b46bdae3d6bde55b Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 14 Jan 2016 23:47:24 +0100 Subject: [PATCH] Changed: Invert version and help checks --- code/nel/src/misc/cmd_args.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/nel/src/misc/cmd_args.cpp b/code/nel/src/misc/cmd_args.cpp index 39f4cb849..82863ba1b 100644 --- a/code/nel/src/misc/cmd_args.cpp +++ b/code/nel/src/misc/cmd_args.cpp @@ -321,13 +321,6 @@ bool CCmdArgs::parse(const std::vector &argv) } } - // process help if requested or if required arguments are missing - if (haveLongArg("help") || (needRequiredArg() && !haveRequiredArg())) - { - displayHelp(); - return false; - } - // process version if (haveLongArg("version")) { @@ -335,6 +328,13 @@ bool CCmdArgs::parse(const std::vector &argv) return false; } + // process help if requested or if required arguments are missing + if (haveLongArg("help") || (needRequiredArg() && !haveRequiredArg())) + { + displayHelp(); + return false; + } + return true; }