summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-07-27 22:22:05 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-07-28 00:15:51 (GMT)
commitffa49c23aaab2d1361321b9de32ef4da9e34c3bc (patch)
treed414048db4a32ccabe053a56e87c18da79e8f40a /Source
parent4489e9a85ce96ec6d15856b298f3d0255c8d615b (diff)
downloadCMake-ffa49c23aaab2d1361321b9de32ef4da9e34c3bc.zip
CMake-ffa49c23aaab2d1361321b9de32ef4da9e34c3bc.tar.gz
CMake-ffa49c23aaab2d1361321b9de32ef4da9e34c3bc.tar.bz2
clang-tidy: fix `readability-else-after-return` lints
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx16
-rw-r--r--Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx3
2 files changed, 10 insertions, 9 deletions
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index b12b817..31ddb0e 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -997,12 +997,12 @@ bool cmCPackWIXGenerator::RequireOption(std::string const& name,
value = *tmp;
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
@@ -1012,9 +1012,8 @@ std::string cmCPackWIXGenerator::GetArchitecture() const
if (void_p_size == "8"_s) {
return "x64";
- } else {
- return "x86";
}
+ return "x86";
}
std::string cmCPackWIXGenerator::GenerateGUID()
@@ -1109,7 +1108,8 @@ std::string cmCPackWIXGenerator::CreateNewIdForPath(std::string const& path)
<< path << '\'' << std::endl);
return std::string();
- } else if (ambiguityCount > 1) {
+ }
+ if (ambiguityCount > 1) {
result << '_' << ambiguityCount;
}
diff --git a/Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx b/Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx
index f3fe3de..cef2da9 100644
--- a/Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx
+++ b/Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx
@@ -158,7 +158,8 @@ void cmWIXRichTextFormatWriter::EmitUnicodeCodepoint(int c)
// Do not emit byte order mark (BOM)
if (c == 0xFEFF) {
return;
- } else if (c <= 0xFFFF) {
+ }
+ if (c <= 0xFFFF) {
EmitUnicodeSurrogate(c);
} else {
c -= 0x10000;