Replace loop with algorithm.

This commit is contained in:
Stephen Kelly 2015-01-25 16:02:46 +01:00
parent 683fafea08
commit 69dbe51b08
1 changed files with 3 additions and 7 deletions

View File

@ -1153,15 +1153,11 @@ cmTarget::LinkLibraryType cmTarget::ComputeLinkType(
// Check if any entry in the list matches this configuration.
std::string configUpper = cmSystemTools::UpperCase(config);
for(std::vector<std::string>::const_iterator i = debugConfigs.begin();
i != debugConfigs.end(); ++i)
{
if(*i == configUpper)
if (std::find(debugConfigs.begin(), debugConfigs.end(), configUpper) !=
debugConfigs.end())
{
return cmTarget::DEBUG;
}
}
// The current configuration is not a debug configuration.
return cmTarget::OPTIMIZED;
}