summaryrefslogtreecommitdiffstats
path: root/Source/cmIfCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2005-11-17 14:44:32 (GMT)
committerKen Martin <ken.martin@kitware.com>2005-11-17 14:44:32 (GMT)
commitfb6d598813de30c5b5d8833fceae2ec8ca1744c8 (patch)
treef7a9c86f00ca073d5edd428cf0f1b3d0cd71dc5d /Source/cmIfCommand.cxx
parent435f4ad8b025bffd4ac5ff2ed09a7bf337d08a87 (diff)
downloadCMake-fb6d598813de30c5b5d8833fceae2ec8ca1744c8.zip
CMake-fb6d598813de30c5b5d8833fceae2ec8ca1744c8.tar.gz
CMake-fb6d598813de30c5b5d8833fceae2ec8ca1744c8.tar.bz2
BUG: clean up scoping
Diffstat (limited to 'Source/cmIfCommand.cxx')
-rw-r--r--Source/cmIfCommand.cxx21
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++;
+ }
}
- }
+ }
}