Replace loop with member algorithm.

This commit is contained in:
Stephen Kelly 2015-01-27 22:09:17 +01:00
parent 94e993a0c1
commit 6cd2ee9524
1 changed files with 5 additions and 6 deletions

View File

@ -3642,14 +3642,13 @@ bool cmLocalGenerator::CheckDefinition(std::string const& define) const
{
// Many compilers do not support -DNAME(arg)=sdf so we disable it.
bool function_style = false;
for(const char* c = define.c_str(); *c && *c != '='; ++c)
std::string::size_type pos = define.find_first_of("(=");
if (pos != std::string::npos)
{
if(*c == '(')
{
function_style = true;
break;
}
function_style = define[pos] == '(';
}
if(function_style)
{
std::ostringstream e;