mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-12 00:58:59 -05:00
Replace loop with member algorithm.
This commit is contained in:
@@ -3642,14 +3642,13 @@ bool cmLocalGenerator::CheckDefinition(std::string const& define) const
|
|||||||
{
|
{
|
||||||
// Many compilers do not support -DNAME(arg)=sdf so we disable it.
|
// Many compilers do not support -DNAME(arg)=sdf so we disable it.
|
||||||
bool function_style = false;
|
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 = define[pos] == '(';
|
||||||
{
|
|
||||||
function_style = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(function_style)
|
if(function_style)
|
||||||
{
|
{
|
||||||
std::ostringstream e;
|
std::ostringstream e;
|
||||||
|
|||||||
Reference in New Issue
Block a user