diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-07-27 18:58:16 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-07-28 00:15:51 (GMT) |
commit | 48b38d2d864988081725cc0d306a18ae1e79ac96 (patch) | |
tree | b10f9d2a8c266edba4ea1dd44111f56fcaa3a680 /Source | |
parent | d4144b9c0a1a8a8f3a24ff33fc2582bb319d73ac (diff) | |
download | CMake-48b38d2d864988081725cc0d306a18ae1e79ac96.zip CMake-48b38d2d864988081725cc0d306a18ae1e79ac96.tar.gz CMake-48b38d2d864988081725cc0d306a18ae1e79ac96.tar.bz2 |
cmLocalVisualStudio10Generator: remove unnecessary `.c_str()`
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CPack/WiX/cmCPackWIXGenerator.cxx | 7 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx | 2 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio10Generator.cxx | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index 9530120..c5b7abd 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -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; diff --git a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx index 13bbf37..a655d86 100644 --- a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx +++ b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx @@ -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(); diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx index 2a1521b..165f0fd 100644 --- a/Source/cmLocalVisualStudio10Generator.cxx +++ b/Source/cmLocalVisualStudio10Generator.cxx @@ -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 |