diff options
author | Ken Martin <ken.martin@kitware.com> | 2005-11-17 09:44:32 -0500 |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2005-11-17 09:44:32 -0500 |
commit | fb6d598813de30c5b5d8833fceae2ec8ca1744c8 (patch) | |
tree | f7a9c86f00ca073d5edd428cf0f1b3d0cd71dc5d /Source | |
parent | 435f4ad8b025bffd4ac5ff2ed09a7bf337d08a87 (diff) | |
download | cmake-fb6d598813de30c5b5d8833fceae2ec8ca1744c8.tar.gz |
BUG: clean up scoping
Diffstat (limited to 'Source')
-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 f04f79ac6f..c99bb737c7 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++; + } } - } + } } |