summaryrefslogtreecommitdiffstats
path: root/Source/cmSetCommand.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-10-10 12:11:37 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-10-10 12:11:37 (GMT)
commitf6a1218e102373bd945cd58c9d01d0200bcb3a54 (patch)
treead47f5f0a8c7422994f81be24801b4ba26f49d83 /Source/cmSetCommand.cxx
parent089429fee9142fce0890801235fd2f5d1fc3275d (diff)
downloadCMake-f6a1218e102373bd945cd58c9d01d0200bcb3a54.zip
CMake-f6a1218e102373bd945cd58c9d01d0200bcb3a54.tar.gz
CMake-f6a1218e102373bd945cd58c9d01d0200bcb3a54.tar.bz2
Remove warning
Diffstat (limited to 'Source/cmSetCommand.cxx')
-rw-r--r--Source/cmSetCommand.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx
index df3240e..f1c3579 100644
--- a/Source/cmSetCommand.cxx
+++ b/Source/cmSetCommand.cxx
@@ -60,25 +60,28 @@ bool cmSetCommand::InitialPass(std::vector<std::string> const& args)
return true;
}
}
-
+
// look for FORCE argument
if (args.size() > 4 && args[args.size()-1] == "FORCE")
{
force = true;
}
+ std::vector<std::string>::size_type arg4, arg5;
+ arg4 = 4 + (force ? 1 : 0);
+ arg5 = 5 + (force ? 1 : 0);
if(args.size() == 2)
{
// SET (VAR value )
value= args[1];
}
- else if(args.size() == 4 + (force ? 1 : 0))
+ else if(args.size() == arg4)
{
// SET (VAR CACHE TYPE "doc String")
cache = true;
cacheStart = 1;
}
- else if(args.size() == 5 + (force ? 1 : 0))
+ else if(args.size() == arg5)
{
// SET (VAR value CACHE TYPE "doc string")
cache = true;