diff options
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWPackage.cxx | 6 | ||||
-rw-r--r-- | Source/CPack/cmCPackNSISGenerator.cxx | 10 | ||||
-rw-r--r-- | Source/CPack/cmCPackRPMGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/CPack/cpack.cxx | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx index df612e5..ad153d1 100644 --- a/Source/CPack/IFW/cmCPackIFWPackage.cxx +++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx @@ -56,13 +56,13 @@ cmCPackIFWPackage::DependenceStruct::DependenceStruct( } else if ((pos = dependence.find(">=")) != std::string::npos) { Compare.Type = CompareGreaterOrEqual; Compare.Value = dependence.substr(pos + 2); - } else if ((pos = dependence.find("<")) != std::string::npos) { + } else if ((pos = dependence.find('<')) != std::string::npos) { Compare.Type = CompareLess; Compare.Value = dependence.substr(pos + 1); - } else if ((pos = dependence.find("=")) != std::string::npos) { + } else if ((pos = dependence.find('=')) != std::string::npos) { Compare.Type = CompareEqual; Compare.Value = dependence.substr(pos + 1); - } else if ((pos = dependence.find(">")) != std::string::npos) { + } else if ((pos = dependence.find('>')) != std::string::npos) { Compare.Type = CompareGreater; Compare.Value = dependence.substr(pos + 1); } diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index 4d48cb5..9fa588d 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -74,7 +74,7 @@ int cmCPackNSISGenerator::PackageFiles() // Strip off the component part of the path. fileN = fileN.substr(fileN.find('/') + 1, std::string::npos); } - cmSystemTools::ReplaceString(fileN, "/", "\\"); + std::replace(fileN.begin(), fileN.end(), '/', '\\'); str << " Delete \"$INSTDIR\\" << fileN << "\"" << std::endl; } cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Files: " << str.str() @@ -104,7 +104,7 @@ int cmCPackNSISGenerator::PackageFiles() fileN = fileN.substr(slash + 1, std::string::npos); } } - cmSystemTools::ReplaceString(fileN, "/", "\\"); + std::replace(fileN.begin(), fileN.end(), '/', '\\'); dstr << " RMDir \"$INSTDIR\\" << fileN << "\"" << std::endl; if (!componentName.empty()) { this->Components[componentName].Directories.push_back(fileN); @@ -548,7 +548,7 @@ void cmCPackNSISGenerator::CreateMenuLinks(std::ostringstream& str, // Convert / to \ in filenames, but not in urls: // if (!url) { - cmSystemTools::ReplaceString(sourceName, "/", "\\"); + std::replace(sourceName.begin(), sourceName.end(), '/', '\\'); } ++it; @@ -790,13 +790,13 @@ std::string cmCPackNSISGenerator::CreateComponentDescription( for (pathIt = component->Files.begin(); pathIt != component->Files.end(); ++pathIt) { path = *pathIt; - cmSystemTools::ReplaceString(path, "/", "\\"); + std::replace(path.begin(), path.end(), '/', '\\'); macrosOut << " Delete \"$INSTDIR\\" << path << "\"\n"; } for (pathIt = component->Directories.begin(); pathIt != component->Directories.end(); ++pathIt) { path = *pathIt; - cmSystemTools::ReplaceString(path, "/", "\\"); + std::replace(path.begin(), path.end(), '/', '\\'); macrosOut << " RMDir \"$INSTDIR\\" << path << "\"\n"; } macrosOut << " noremove_" << component->Name << ":\n"; diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx index fc6603a..a4b9a47 100644 --- a/Source/CPack/cmCPackRPMGenerator.cxx +++ b/Source/CPack/cmCPackRPMGenerator.cxx @@ -34,13 +34,13 @@ int cmCPackRPMGenerator::InitializeInternal() */ if (this->GetOption("CPACK_PACKAGE_NAME")) { std::string packageName = this->GetOption("CPACK_PACKAGE_NAME"); - cmSystemTools::ReplaceString(packageName, " ", "-"); + std::replace(packageName.begin(), packageName.end(), ' ', '-'); this->SetOption("CPACK_PACKAGE_NAME", packageName.c_str()); } /* same for CPACK_PACKAGE_FILE_NAME */ if (this->GetOption("CPACK_PACKAGE_FILE_NAME")) { std::string packageName = this->GetOption("CPACK_PACKAGE_FILE_NAME"); - cmSystemTools::ReplaceString(packageName, " ", "-"); + std::replace(packageName.begin(), packageName.end(), ' ', '-'); this->SetOption("CPACK_PACKAGE_FILE_NAME", packageName.c_str()); } return this->Superclass::InitializeInternal(); diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index e54be2c..10f60b2 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -68,7 +68,7 @@ int cpackDefinitionArgument(const char* argument, const char* cValue, (void)argument; cpackDefinitions* def = static_cast<cpackDefinitions*>(call_data); std::string value = cValue; - size_t pos = value.find_first_of("="); + size_t pos = value.find_first_of('='); if (pos == std::string::npos) { cmCPack_Log(def->Log, cmCPackLog::LOG_ERROR, "Please specify CPack definitions as: KEY=VALUE" << std::endl); |