mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-18 00:02:21 +08:00
clang-tidy: fix readability-else-after-return
lints
This commit is contained in:
@@ -997,12 +997,12 @@ bool cmCPackWIXGenerator::RequireOption(std::string const& name,
|
|||||||
value = *tmp;
|
value = *tmp;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
|
||||||
"Required variable " << name << " not set" << std::endl);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
|
"Required variable " << name << " not set" << std::endl);
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string cmCPackWIXGenerator::GetArchitecture() const
|
std::string cmCPackWIXGenerator::GetArchitecture() const
|
||||||
@@ -1012,9 +1012,8 @@ std::string cmCPackWIXGenerator::GetArchitecture() const
|
|||||||
|
|
||||||
if (void_p_size == "8"_s) {
|
if (void_p_size == "8"_s) {
|
||||||
return "x64";
|
return "x64";
|
||||||
} else {
|
|
||||||
return "x86";
|
|
||||||
}
|
}
|
||||||
|
return "x86";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string cmCPackWIXGenerator::GenerateGUID()
|
std::string cmCPackWIXGenerator::GenerateGUID()
|
||||||
@@ -1109,7 +1108,8 @@ std::string cmCPackWIXGenerator::CreateNewIdForPath(std::string const& path)
|
|||||||
<< path << '\'' << std::endl);
|
<< path << '\'' << std::endl);
|
||||||
|
|
||||||
return std::string();
|
return std::string();
|
||||||
} else if (ambiguityCount > 1) {
|
}
|
||||||
|
if (ambiguityCount > 1) {
|
||||||
result << '_' << ambiguityCount;
|
result << '_' << ambiguityCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -158,7 +158,8 @@ void cmWIXRichTextFormatWriter::EmitUnicodeCodepoint(int c)
|
|||||||
// Do not emit byte order mark (BOM)
|
// Do not emit byte order mark (BOM)
|
||||||
if (c == 0xFEFF) {
|
if (c == 0xFEFF) {
|
||||||
return;
|
return;
|
||||||
} else if (c <= 0xFFFF) {
|
}
|
||||||
|
if (c <= 0xFFFF) {
|
||||||
EmitUnicodeSurrogate(c);
|
EmitUnicodeSurrogate(c);
|
||||||
} else {
|
} else {
|
||||||
c -= 0x10000;
|
c -= 0x10000;
|
||||||
|
Reference in New Issue
Block a user