mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 10:47:59 +08:00
Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
This commit is contained in:
@@ -132,14 +132,14 @@ bool cmExecProgramCommand
|
||||
}
|
||||
|
||||
std::string coutput = std::string(output, first, last-first+1);
|
||||
this->Makefile->AddDefinition(output_variable.c_str(), coutput.c_str());
|
||||
this->Makefile->AddDefinition(output_variable, coutput.c_str());
|
||||
}
|
||||
|
||||
if ( return_variable.size() > 0 )
|
||||
{
|
||||
char buffer[100];
|
||||
sprintf(buffer, "%d", retVal);
|
||||
this->Makefile->AddDefinition(return_variable.c_str(), buffer);
|
||||
this->Makefile->AddDefinition(return_variable, buffer);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user