cmGlobalGenerator: Replace loop with algorithm.

This commit is contained in:
Stephen Kelly 2015-02-12 22:29:11 +01:00
parent 05fec779d3
commit 60c3bb73e3
1 changed files with 4 additions and 9 deletions

View File

@ -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(