mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-21 23:00:50 +08:00
clang-tidy: remove reduntant .data() calls
This commit is contained in:
@@ -288,7 +288,7 @@ public:
|
|||||||
hasFiles = false;
|
hasFiles = false;
|
||||||
hasErrors = false;
|
hasErrors = false;
|
||||||
|
|
||||||
basePath = cmSystemTools::GetFilenamePath(installer->Resources[r].data());
|
basePath = cmSystemTools::GetFilenamePath(installer->Resources[r]);
|
||||||
|
|
||||||
ParseFile(installer->Resources[r].data());
|
ParseFile(installer->Resources[r].data());
|
||||||
|
|
||||||
@@ -360,8 +360,7 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
|
|||||||
cmSystemTools::GetFilenameName(InstallerApplicationIcon);
|
cmSystemTools::GetFilenameName(InstallerApplicationIcon);
|
||||||
std::string path = Directory + "/config/" + name;
|
std::string path = Directory + "/config/" + name;
|
||||||
name = cmSystemTools::GetFilenameWithoutExtension(name);
|
name = cmSystemTools::GetFilenameWithoutExtension(name);
|
||||||
cmsys::SystemTools::CopyFileIfDifferent(InstallerApplicationIcon.data(),
|
cmsys::SystemTools::CopyFileIfDifferent(InstallerApplicationIcon, path);
|
||||||
path.data());
|
|
||||||
xout.Element("InstallerApplicationIcon", name);
|
xout.Element("InstallerApplicationIcon", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -369,8 +368,7 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
|
|||||||
if (!InstallerWindowIcon.empty()) {
|
if (!InstallerWindowIcon.empty()) {
|
||||||
std::string name = cmSystemTools::GetFilenameName(InstallerWindowIcon);
|
std::string name = cmSystemTools::GetFilenameName(InstallerWindowIcon);
|
||||||
std::string path = Directory + "/config/" + name;
|
std::string path = Directory + "/config/" + name;
|
||||||
cmsys::SystemTools::CopyFileIfDifferent(InstallerWindowIcon.data(),
|
cmsys::SystemTools::CopyFileIfDifferent(InstallerWindowIcon, path);
|
||||||
path.data());
|
|
||||||
xout.Element("InstallerWindowIcon", name);
|
xout.Element("InstallerWindowIcon", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -378,7 +376,7 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
|
|||||||
if (!Logo.empty()) {
|
if (!Logo.empty()) {
|
||||||
std::string name = cmSystemTools::GetFilenameName(Logo);
|
std::string name = cmSystemTools::GetFilenameName(Logo);
|
||||||
std::string path = Directory + "/config/" + name;
|
std::string path = Directory + "/config/" + name;
|
||||||
cmsys::SystemTools::CopyFileIfDifferent(Logo.data(), path.data());
|
cmsys::SystemTools::CopyFileIfDifferent(Logo, path);
|
||||||
xout.Element("Logo", name);
|
xout.Element("Logo", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,7 +384,7 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
|
|||||||
if (!Banner.empty()) {
|
if (!Banner.empty()) {
|
||||||
std::string name = cmSystemTools::GetFilenameName(Banner);
|
std::string name = cmSystemTools::GetFilenameName(Banner);
|
||||||
std::string path = Directory + "/config/" + name;
|
std::string path = Directory + "/config/" + name;
|
||||||
cmsys::SystemTools::CopyFileIfDifferent(Banner.data(), path.data());
|
cmsys::SystemTools::CopyFileIfDifferent(Banner, path);
|
||||||
xout.Element("Banner", name);
|
xout.Element("Banner", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -394,7 +392,7 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
|
|||||||
if (!Watermark.empty()) {
|
if (!Watermark.empty()) {
|
||||||
std::string name = cmSystemTools::GetFilenameName(Watermark);
|
std::string name = cmSystemTools::GetFilenameName(Watermark);
|
||||||
std::string path = Directory + "/config/" + name;
|
std::string path = Directory + "/config/" + name;
|
||||||
cmsys::SystemTools::CopyFileIfDifferent(Watermark.data(), path.data());
|
cmsys::SystemTools::CopyFileIfDifferent(Watermark, path);
|
||||||
xout.Element("Watermark", name);
|
xout.Element("Watermark", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -402,7 +400,7 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
|
|||||||
if (!Background.empty()) {
|
if (!Background.empty()) {
|
||||||
std::string name = cmSystemTools::GetFilenameName(Background);
|
std::string name = cmSystemTools::GetFilenameName(Background);
|
||||||
std::string path = Directory + "/config/" + name;
|
std::string path = Directory + "/config/" + name;
|
||||||
cmsys::SystemTools::CopyFileIfDifferent(Background.data(), path.data());
|
cmsys::SystemTools::CopyFileIfDifferent(Background, path);
|
||||||
xout.Element("Background", name);
|
xout.Element("Background", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -480,7 +478,7 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
|
|||||||
if (!IsVersionLess("2.0") && !ControlScript.empty()) {
|
if (!IsVersionLess("2.0") && !ControlScript.empty()) {
|
||||||
std::string name = cmSystemTools::GetFilenameName(ControlScript);
|
std::string name = cmSystemTools::GetFilenameName(ControlScript);
|
||||||
std::string path = Directory + "/config/" + name;
|
std::string path = Directory + "/config/" + name;
|
||||||
cmsys::SystemTools::CopyFileIfDifferent(ControlScript.data(), path.data());
|
cmsys::SystemTools::CopyFileIfDifferent(ControlScript, path);
|
||||||
xout.Element("ControlScript", name);
|
xout.Element("ControlScript", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,8 +490,7 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
|
|||||||
if (parser.ParseResource(i)) {
|
if (parser.ParseResource(i)) {
|
||||||
std::string name = cmSystemTools::GetFilenameName(Resources[i]);
|
std::string name = cmSystemTools::GetFilenameName(Resources[i]);
|
||||||
std::string path = Directory + "/resources/" + name;
|
std::string path = Directory + "/resources/" + name;
|
||||||
cmsys::SystemTools::CopyFileIfDifferent(Resources[i].data(),
|
cmsys::SystemTools::CopyFileIfDifferent(Resources[i], path);
|
||||||
path.data());
|
|
||||||
resources.push_back(name);
|
resources.push_back(name);
|
||||||
} else {
|
} else {
|
||||||
cmCPackLogger(cmCPackLog::LOG_WARNING, "Can't copy resources from \""
|
cmCPackLogger(cmCPackLog::LOG_WARNING, "Can't copy resources from \""
|
||||||
|
@@ -590,7 +590,7 @@ void cmCPackIFWPackage::GeneratePackageFile()
|
|||||||
if (!Script.empty()) {
|
if (!Script.empty()) {
|
||||||
std::string name = cmSystemTools::GetFilenameName(Script);
|
std::string name = cmSystemTools::GetFilenameName(Script);
|
||||||
std::string path = Directory + "/meta/" + name;
|
std::string path = Directory + "/meta/" + name;
|
||||||
cmsys::SystemTools::CopyFileIfDifferent(Script.data(), path.data());
|
cmsys::SystemTools::CopyFileIfDifferent(Script, path);
|
||||||
xout.Element("Script", name);
|
xout.Element("Script", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -599,8 +599,7 @@ void cmCPackIFWPackage::GeneratePackageFile()
|
|||||||
for (size_t i = 0; i < userInterfaces.size(); i++) {
|
for (size_t i = 0; i < userInterfaces.size(); i++) {
|
||||||
std::string name = cmSystemTools::GetFilenameName(userInterfaces[i]);
|
std::string name = cmSystemTools::GetFilenameName(userInterfaces[i]);
|
||||||
std::string path = Directory + "/meta/" + name;
|
std::string path = Directory + "/meta/" + name;
|
||||||
cmsys::SystemTools::CopyFileIfDifferent(userInterfaces[i].data(),
|
cmsys::SystemTools::CopyFileIfDifferent(userInterfaces[i], path);
|
||||||
path.data());
|
|
||||||
userInterfaces[i] = name;
|
userInterfaces[i] = name;
|
||||||
}
|
}
|
||||||
if (!userInterfaces.empty()) {
|
if (!userInterfaces.empty()) {
|
||||||
@@ -616,8 +615,7 @@ void cmCPackIFWPackage::GeneratePackageFile()
|
|||||||
for (size_t i = 0; i < translations.size(); i++) {
|
for (size_t i = 0; i < translations.size(); i++) {
|
||||||
std::string name = cmSystemTools::GetFilenameName(translations[i]);
|
std::string name = cmSystemTools::GetFilenameName(translations[i]);
|
||||||
std::string path = Directory + "/meta/" + name;
|
std::string path = Directory + "/meta/" + name;
|
||||||
cmsys::SystemTools::CopyFileIfDifferent(translations[i].data(),
|
cmsys::SystemTools::CopyFileIfDifferent(translations[i], path);
|
||||||
path.data());
|
|
||||||
translations[i] = name;
|
translations[i] = name;
|
||||||
}
|
}
|
||||||
if (!translations.empty()) {
|
if (!translations.empty()) {
|
||||||
@@ -675,7 +673,7 @@ void cmCPackIFWPackage::GeneratePackageFile()
|
|||||||
for (size_t i = 1; i < licenses.size(); i += 2) {
|
for (size_t i = 1; i < licenses.size(); i += 2) {
|
||||||
std::string name = cmSystemTools::GetFilenameName(licenses[i]);
|
std::string name = cmSystemTools::GetFilenameName(licenses[i]);
|
||||||
std::string path = Directory + "/meta/" + name;
|
std::string path = Directory + "/meta/" + name;
|
||||||
cmsys::SystemTools::CopyFileIfDifferent(licenses[i].data(), path.data());
|
cmsys::SystemTools::CopyFileIfDifferent(licenses[i], path);
|
||||||
licenses[i] = name;
|
licenses[i] = name;
|
||||||
}
|
}
|
||||||
if (!licenses.empty()) {
|
if (!licenses.empty()) {
|
||||||
|
Reference in New Issue
Block a user