summaryrefslogtreecommitdiffstats
path: root/Source/cmListCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-02-12 19:07:20 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-15 18:04:30 (GMT)
commit069f2440c471e89dfe2ecf6778bbab16e9fbe491 (patch)
tree91ad401255648bf779e5b9f5661550dde76f8670 /Source/cmListCommand.cxx
parent67a26764b536992a966cacab4811c2d30624405c (diff)
downloadCMake-069f2440c471e89dfe2ecf6778bbab16e9fbe491.zip
CMake-069f2440c471e89dfe2ecf6778bbab16e9fbe491.tar.gz
CMake-069f2440c471e89dfe2ecf6778bbab16e9fbe491.tar.bz2
cmListCommand: Convert loop to find algorithm.
Diffstat (limited to 'Source/cmListCommand.cxx')
-rw-r--r--Source/cmListCommand.cxx13
1 files changed, 1 insertions, 12 deletions
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index 22d8b0e..826632f 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -104,19 +104,8 @@ bool cmListCommand::GetList(std::vector<std::string>& list,
}
// expand the variable into a list
cmSystemTools::ExpandListArgument(listString, list, true);
- // check the list for empty values
- bool hasEmpty = false;
- for(std::vector<std::string>::iterator i = list.begin();
- i != list.end(); ++i)
- {
- if(i->empty())
- {
- hasEmpty = true;
- break;
- }
- }
// if no empty elements then just return
- if(!hasEmpty)
+ if (std::find(list.begin(), list.end(), std::string()) == list.end())
{
return true;
}