diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-27 21:09:17 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-02-06 18:04:10 (GMT) |
commit | 6cd2ee9524e501a4ef9dc481b469b91f8f022dc9 (patch) | |
tree | 775b1831dc17a53d362f1843a7e5d675b7c2c892 /Source/cmLocalGenerator.cxx | |
parent | 94e993a0c170cf84da9ddb026dfec9d8d99304e0 (diff) | |
download | CMake-6cd2ee9524e501a4ef9dc481b469b91f8f022dc9.zip CMake-6cd2ee9524e501a4ef9dc481b469b91f8f022dc9.tar.gz CMake-6cd2ee9524e501a4ef9dc481b469b91f8f022dc9.tar.bz2 |
Replace loop with member algorithm.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 11 |
1 files 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; |