clang-tidy: Fix readability-redundant-string-cstr warnings

This commit is contained in:
Brad King 2023-05-22 14:32:45 -04:00
parent bd4ec7a71e
commit 9ea7b4ac66
3 changed files with 5 additions and 6 deletions

View File

@ -25,7 +25,7 @@ bool cmGetTestPropertyCommand(std::vector<std::string> const& args,
prop = test->GetProperty(args[1]);
}
if (prop) {
mf.AddDefinition(var, prop->c_str());
mf.AddDefinition(var, prop);
return true;
}
}

View File

@ -785,7 +785,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
if (this->GeneratorTarget->HasSOName(this->GetConfigName())) {
vars.SONameFlag = this->Makefile->GetSONameFlag(linkLanguage);
targetOutSOName = this->LocalGenerator->ConvertToOutputFormat(
this->TargetNames.SharedObject.c_str(), cmOutputConverter::SHELL);
this->TargetNames.SharedObject, cmOutputConverter::SHELL);
vars.TargetSOName = targetOutSOName.c_str();
}
vars.LinkFlags = linkFlags.c_str();

View File

@ -2272,10 +2272,9 @@ cmQtAutoMocUicT::JobDepFilesMergeT::initialDependencies() const
void cmQtAutoMocUicT::JobDepFilesMergeT::Process()
{
if (this->Log().Verbose()) {
this->Log().Info(
GenT::MOC,
cmStrCat("Merging MOC dependencies into ",
this->MessagePath(this->BaseConst().DepFile.c_str())));
this->Log().Info(GenT::MOC,
cmStrCat("Merging MOC dependencies into ",
this->MessagePath(this->BaseConst().DepFile)));
}
auto processDepFile =
[this](const std::string& mocOutputFile) -> std::vector<std::string> {