diff options
author | Vitaly Stakhovsky <vvs31415@users.noreply.gitlab.com> | 2023-01-15 15:13:14 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@users.noreply.gitlab.com> | 2023-01-16 04:39:02 (GMT) |
commit | b3edfcf46ec1514a376d4e3dca7538cc750844d5 (patch) | |
tree | c5a26d80efd9bbeb2783d8e6508097a2d9ee0b09 /Source/CPack/IFW | |
parent | 701badbd20a33d8f955cb6d86016d5bf415b8212 (diff) | |
download | CMake-b3edfcf46ec1514a376d4e3dca7538cc750844d5.zip CMake-b3edfcf46ec1514a376d4e3dca7538cc750844d5.tar.gz CMake-b3edfcf46ec1514a376d4e3dca7538cc750844d5.tar.bz2 |
cmValue: Use operator* explicitly to convert to std::string; avoid extra call
Diffstat (limited to 'Source/CPack/IFW')
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWInstaller.cxx | 38 | ||||
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWPackage.cxx | 6 |
3 files changed, 24 insertions, 22 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx index 9dd8fe3..bc14eb4 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx +++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx @@ -585,7 +585,7 @@ std::string cmCPackIFWGenerator::GetRootPackageName() // Configure from root group cmCPackIFWPackage package; package.Generator = this; - package.ConfigureFromGroup(optIFW_PACKAGE_GROUP); + package.ConfigureFromGroup(*optIFW_PACKAGE_GROUP); name = package.Name; } else if (cmValue optIFW_PACKAGE_NAME = this->GetOption("CPACK_IFW_PACKAGE_NAME")) { diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx index 2feca75..69440d9 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx +++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx @@ -77,19 +77,20 @@ void cmCPackIFWInstaller::ConfigureFromOptions() // ApplicationIcon if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_ICON")) { - if (cmSystemTools::FileExists(option)) { + if (cmSystemTools::FileExists(*option)) { this->InstallerApplicationIcon = *option; } else { - this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_ICON", option); + this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_ICON", *option); } } // WindowIcon if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_WINDOW_ICON")) { - if (cmSystemTools::FileExists(option)) { + if (cmSystemTools::FileExists(*option)) { this->InstallerWindowIcon = *option; } else { - this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_WINDOW_ICON", option); + this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_WINDOW_ICON", + *option); } } @@ -104,37 +105,37 @@ void cmCPackIFWInstaller::ConfigureFromOptions() // Logo if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_LOGO")) { - if (cmSystemTools::FileExists(option)) { + if (cmSystemTools::FileExists(*option)) { this->Logo = *option; } else { - this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_LOGO", option); + this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_LOGO", *option); } } // Watermark if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_WATERMARK")) { - if (cmSystemTools::FileExists(option)) { + if (cmSystemTools::FileExists(*option)) { this->Watermark = *option; } else { - this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_WATERMARK", option); + this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_WATERMARK", *option); } } // Banner if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_BANNER")) { - if (cmSystemTools::FileExists(option)) { + if (cmSystemTools::FileExists(*option)) { this->Banner = *option; } else { - this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_BANNER", option); + this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_BANNER", *option); } } // Background if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_BACKGROUND")) { - if (cmSystemTools::FileExists(option)) { + if (cmSystemTools::FileExists(*option)) { this->Background = *option; } else { - this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_BACKGROUND", option); + this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_BACKGROUND", *option); } } @@ -155,10 +156,11 @@ void cmCPackIFWInstaller::ConfigureFromOptions() // StyleSheet if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_STYLE_SHEET")) { - if (cmSystemTools::FileExists(option)) { + if (cmSystemTools::FileExists(*option)) { this->StyleSheet = *option; } else { - this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_STYLE_SHEET", option); + this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_STYLE_SHEET", + *option); } } @@ -276,9 +278,9 @@ void cmCPackIFWInstaller::ConfigureFromOptions() // Control script if (cmValue optIFW_CONTROL_SCRIPT = this->GetOption("CPACK_IFW_PACKAGE_CONTROL_SCRIPT")) { - if (!cmSystemTools::FileExists(optIFW_CONTROL_SCRIPT)) { + if (!cmSystemTools::FileExists(*optIFW_CONTROL_SCRIPT)) { this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_CONTROL_SCRIPT", - optIFW_CONTROL_SCRIPT); + *optIFW_CONTROL_SCRIPT); } else { this->ControlScript = *optIFW_CONTROL_SCRIPT; } @@ -653,9 +655,9 @@ void cmCPackIFWInstaller::GeneratePackageFiles() package.Installer = this; // Check package group if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_GROUP")) { - package.ConfigureFromGroup(option); + package.ConfigureFromGroup(*option); std::string forcedOption = "CPACK_IFW_COMPONENT_GROUP_" + - cmsys::SystemTools::UpperCase(option) + "_FORCED_INSTALLATION"; + cmsys::SystemTools::UpperCase(*option) + "_FORCED_INSTALLATION"; if (!this->GetOption(forcedOption)) { package.ForcedInstallation = "true"; } diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx index c2109c9..1668fb5 100644 --- a/Source/CPack/IFW/cmCPackIFWPackage.cxx +++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx @@ -382,7 +382,7 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix) if (this->IsSetToEmpty(option)) { this->DisplayName.clear(); } else if (cmValue value = this->GetOption(option)) { - cmCPackIFWPackage::ExpandListArgument(value, this->DisplayName); + cmCPackIFWPackage::ExpandListArgument(*value, this->DisplayName); } // Description @@ -390,7 +390,7 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix) if (this->IsSetToEmpty(option)) { this->Description.clear(); } else if (cmValue value = this->GetOption(option)) { - cmCPackIFWPackage::ExpandListArgument(value, this->Description); + cmCPackIFWPackage::ExpandListArgument(*value, this->Description); } // Release date @@ -484,7 +484,7 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix) if (this->IsSetToEmpty(option)) { this->Default.clear(); } else if (cmValue value = this->GetOption(option)) { - std::string lowerValue = cmsys::SystemTools::LowerCase(value); + std::string lowerValue = cmsys::SystemTools::LowerCase(*value); if (lowerValue == "true") { this->Default = "true"; } else if (lowerValue == "false") { |