summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-25 15:02:46 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-06 18:04:10 (GMT)
commit69dbe51b08bd6b4564d031d78034633f55ed4593 (patch)
treeb19e321f77f43fc89aab4d02e33675b42954a0e5 /Source/cmTarget.cxx
parent683fafea088c26658283da3bdf05277aaa1a3cee (diff)
downloadCMake-69dbe51b08bd6b4564d031d78034633f55ed4593.zip
CMake-69dbe51b08bd6b4564d031d78034633f55ed4593.tar.gz
CMake-69dbe51b08bd6b4564d031d78034633f55ed4593.tar.bz2
Replace loop with algorithm.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index ef42b38..f0bdea7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -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 (std::find(debugConfigs.begin(), debugConfigs.end(), configUpper) !=
+ debugConfigs.end())
{
- if(*i == configUpper)
- {
- return cmTarget::DEBUG;
- }
+ return cmTarget::DEBUG;
}
-
// The current configuration is not a debug configuration.
return cmTarget::OPTIMIZED;
}