From 6cd2ee9524e501a4ef9dc481b469b91f8f022dc9 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 27 Jan 2015 22:09:17 +0100 Subject: Replace loop with member algorithm. --- Source/cmLocalGenerator.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 9109db4..bd9cb26 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -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; -- cgit v0.12