cmLocalVisualStudio10Generator: remove unnecessary `.c_str()`

stage/master/nightly/2023/08/01^2
Ben Boeckel 2023-07-27 14:58:16 -04:00
parent d4144b9c0a
commit 48b38d2d86
3 changed files with 5 additions and 6 deletions

View File

@ -936,12 +936,11 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitions(
std::string fullPath = cmStrCat(topdir, '/', fileName);
std::string relativePath =
cmSystemTools::RelativePath(toplevel.c_str(), fullPath.c_str());
std::string relativePath = cmSystemTools::RelativePath(toplevel, fullPath);
std::string id = PathToId(relativePath);
if (cmSystemTools::FileIsDirectory(fullPath.c_str())) {
if (cmSystemTools::FileIsDirectory(fullPath)) {
std::string subDirectoryId = cmStrCat("CM_D", id);
directoryDefinitions.BeginElement("Directory");
@ -1070,7 +1069,7 @@ std::string cmCPackWIXGenerator::PathToId(std::string const& path)
std::string cmCPackWIXGenerator::CreateNewIdForPath(std::string const& path)
{
std::vector<std::string> components;
cmSystemTools::SplitPath(path.c_str(), components, false);
cmSystemTools::SplitPath(path, components, false);
size_t replacementCount = 0;

View File

@ -55,7 +55,7 @@ size_t cmWIXDirectoriesSourceWriter::BeginInstallationPrefixDirectory(
std::vector<std::string> installRoot;
cmSystemTools::SplitPath(installRootString.c_str(), installRoot);
cmSystemTools::SplitPath(installRootString, installRoot);
if (!installRoot.empty() && installRoot.back().empty()) {
installRoot.pop_back();

View File

@ -95,7 +95,7 @@ void cmLocalVisualStudio10Generator::ReadAndStoreExternalGUID(
std::string guidStoreName = cmStrCat(name, "_GUID_CMAKE");
// save the GUID in the cache
this->GlobalGenerator->GetCMakeInstance()->AddCacheEntry(
guidStoreName, parser.GUID.c_str(), "Stored GUID", cmStateEnums::INTERNAL);
guidStoreName, parser.GUID, "Stored GUID", cmStateEnums::INTERNAL);
}
const char* cmLocalVisualStudio10Generator::ReportErrorLabel() const