summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-02-12 21:29:11 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-20 20:26:18 (GMT)
commit60c3bb73e39f7b19a17c989a0f9bf70bbfe73683 (patch)
treedafa40f66f2baa3c3c2bd8d9b2a88718e1b7cb55 /Source/cmGlobalGenerator.cxx
parent05fec779d33b872721b9731e872125ebeb89403b (diff)
downloadCMake-60c3bb73e39f7b19a17c989a0f9bf70bbfe73683.zip
CMake-60c3bb73e39f7b19a17c989a0f9bf70bbfe73683.tar.gz
CMake-60c3bb73e39f7b19a17c989a0f9bf70bbfe73683.tar.bz2
cmGlobalGenerator: Replace loop with algorithm.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index c976c69..ac4489a 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2571,17 +2571,12 @@ bool cmGlobalGenerator::IsReservedTarget(std::string const& name)
"test", "RUN_TESTS",
"package", "PACKAGE",
"package_source",
- "ZERO_CHECK",
- 0
+ "ZERO_CHECK"
};
- for(const char** reservedTarget = reservedTargets;
- *reservedTarget; ++reservedTarget)
- {
- if(name == *reservedTarget) return true;
- }
-
- return false;
+ return std::find(cmArrayBegin(reservedTargets),
+ cmArrayEnd(reservedTargets), name)
+ != cmArrayEnd(reservedTargets);
}
void cmGlobalGenerator::SetExternalMakefileProjectGenerator(