mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-29 10:39:28 -05: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:
@@ -54,7 +54,7 @@ bool cmGetDirectoryPropertyCommand
|
||||
// lookup the makefile from the directory name
|
||||
cmLocalGenerator *lg =
|
||||
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
|
||||
FindLocalGenerator(sd.c_str());
|
||||
FindLocalGenerator(sd);
|
||||
if (!lg)
|
||||
{
|
||||
this->SetError
|
||||
@@ -79,18 +79,18 @@ bool cmGetDirectoryPropertyCommand
|
||||
"providing the name of the variable to get.");
|
||||
return false;
|
||||
}
|
||||
output = dir->GetSafeDefinition(i->c_str());
|
||||
this->Makefile->AddDefinition(variable.c_str(), output.c_str());
|
||||
output = dir->GetSafeDefinition(*i);
|
||||
this->Makefile->AddDefinition(variable, output.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
const char *prop = dir->GetProperty(i->c_str());
|
||||
const char *prop = dir->GetProperty(*i);
|
||||
if (prop)
|
||||
{
|
||||
this->Makefile->AddDefinition(variable.c_str(), prop);
|
||||
this->Makefile->AddDefinition(variable, prop);
|
||||
return true;
|
||||
}
|
||||
this->Makefile->AddDefinition(variable.c_str(), "");
|
||||
this->Makefile->AddDefinition(variable, "");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user