mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 14:50:15 -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:
@@ -26,17 +26,17 @@ bool cmGetTestPropertyCommand
|
||||
|
||||
std::string testName = args[0];
|
||||
std::string var = args[2];
|
||||
cmTest *test = this->Makefile->GetTest(testName.c_str());
|
||||
cmTest *test = this->Makefile->GetTest(testName);
|
||||
if (test)
|
||||
{
|
||||
const char *prop = test->GetProperty(args[1].c_str());
|
||||
const char *prop = test->GetProperty(args[1]);
|
||||
if (prop)
|
||||
{
|
||||
this->Makefile->AddDefinition(var.c_str(), prop);
|
||||
this->Makefile->AddDefinition(var, prop);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
this->Makefile->AddDefinition(var.c_str(), "NOTFOUND");
|
||||
this->Makefile->AddDefinition(var, "NOTFOUND");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user