mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
clang-tidy: use operators for string comparison
This commit is contained in:
@@ -171,9 +171,8 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
|
||||
|
||||
// WizardStyle
|
||||
if (const char* option = GetOption("CPACK_IFW_PACKAGE_WIZARD_STYLE")) {
|
||||
if (WizardStyle.compare("Modern") == 0 &&
|
||||
WizardStyle.compare("Aero") == 0 && WizardStyle.compare("Mac") == 0 &&
|
||||
WizardStyle.compare("Classic") == 0) {
|
||||
if (WizardStyle == "Modern" && WizardStyle == "Aero" &&
|
||||
WizardStyle == "Mac" && WizardStyle == "Classic") {
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_WARNING,
|
||||
"Option CPACK_IFW_PACKAGE_WIZARD_STYLE has unknown value \""
|
||||
|
||||
@@ -514,11 +514,11 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix)
|
||||
Default.clear();
|
||||
} else if (const char* value = GetOption(option)) {
|
||||
std::string lowerValue = cmsys::SystemTools::LowerCase(value);
|
||||
if (lowerValue.compare("true") == 0) {
|
||||
if (lowerValue == "true") {
|
||||
Default = "true";
|
||||
} else if (lowerValue.compare("false") == 0) {
|
||||
} else if (lowerValue == "false") {
|
||||
Default = "false";
|
||||
} else if (lowerValue.compare("script") == 0) {
|
||||
} else if (lowerValue == "script") {
|
||||
Default = "script";
|
||||
} else {
|
||||
Default = value;
|
||||
|
||||
Reference in New Issue
Block a user