diff options
Diffstat (limited to 'Source/cmIfCommand.cxx')
-rw-r--r-- | Source/cmIfCommand.cxx | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index f04f79a..c99bb73 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -136,19 +136,22 @@ bool cmIfCommand::InvokeInitialPass(const std::vector<cmListFileArgument>& args) return true; } -void IncrementArguments(std::list<std::string> &newArgs, - std::list<std::string>::iterator &argP1, - std::list<std::string>::iterator &argP2) +namespace { - if (argP1 != newArgs.end()) - { - argP1++; - argP2 = argP1; + void IncrementArguments(std::list<std::string> &newArgs, + std::list<std::string>::iterator &argP1, + std::list<std::string>::iterator &argP2) + { if (argP1 != newArgs.end()) { - argP2++; + argP1++; + argP2 = argP1; + if (argP1 != newArgs.end()) + { + argP2++; + } } - } + } } |