diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-02-12 21:29:11 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-02-20 20:26:18 (GMT) |
commit | 60c3bb73e39f7b19a17c989a0f9bf70bbfe73683 (patch) | |
tree | dafa40f66f2baa3c3c2bd8d9b2a88718e1b7cb55 /Source/cmGlobalGenerator.cxx | |
parent | 05fec779d33b872721b9731e872125ebeb89403b (diff) | |
download | CMake-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.cxx | 13 |
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( |