summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-07-27 22:04:55 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-07-28 00:15:51 (GMT)
commite8983bd20d7bfecba1d5961a68e61bc13efe5e37 (patch)
tree21787699162f88f321b3691b76ad8725b0731e77 /Source
parent1159cdc2354ab1f2eb8bcd76782fd464c715fcaa (diff)
downloadCMake-e8983bd20d7bfecba1d5961a68e61bc13efe5e37.zip
CMake-e8983bd20d7bfecba1d5961a68e61bc13efe5e37.tar.gz
CMake-e8983bd20d7bfecba1d5961a68e61bc13efe5e37.tar.bz2
clang-tidy: fix `readability-braces-around-statements` lints
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx18
-rw-r--r--Source/CPack/WiX/cmWIXAccessControlList.cxx3
-rw-r--r--Source/CPack/WiX/cmWIXPatch.cxx3
3 files changed, 16 insertions, 8 deletions
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index c5b7abd..0dd7760 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -314,8 +314,9 @@ bool cmCPackWIXGenerator::PackageFilesImpl()
void cmCPackWIXGenerator::AppendUserSuppliedExtraSources()
{
cmValue cpackWixExtraSources = GetOption("CPACK_WIX_EXTRA_SOURCES");
- if (!cpackWixExtraSources)
+ if (!cpackWixExtraSources) {
return;
+ }
cmExpandList(cpackWixExtraSources, this->WixSources);
}
@@ -323,8 +324,9 @@ void cmCPackWIXGenerator::AppendUserSuppliedExtraSources()
void cmCPackWIXGenerator::AppendUserSuppliedExtraObjects(std::ostream& stream)
{
cmValue cpackWixExtraObjects = GetOption("CPACK_WIX_EXTRA_OBJECTS");
- if (!cpackWixExtraObjects)
+ if (!cpackWixExtraObjects) {
return;
+ }
cmList expandedExtraObjects{ cpackWixExtraObjects };
@@ -1059,8 +1061,9 @@ std::string cmCPackWIXGenerator::GetRightmostExtension(
std::string cmCPackWIXGenerator::PathToId(std::string const& path)
{
id_map_t::const_iterator i = PathToIdMap.find(path);
- if (i != PathToIdMap.end())
+ if (i != PathToIdMap.end()) {
return i->second;
+ }
std::string id = CreateNewIdForPath(path);
return id;
@@ -1077,8 +1080,9 @@ std::string cmCPackWIXGenerator::CreateNewIdForPath(std::string const& path)
std::string currentComponent;
for (size_t i = 1; i < components.size(); ++i) {
- if (i != 1)
+ if (i != 1) {
identifier += '.';
+ }
currentComponent =
NormalizeComponentForId(components[i], replacementCount);
@@ -1163,8 +1167,9 @@ void cmCPackWIXGenerator::CollectExtensions(std::string const& variableName,
extension_set_t& extensions)
{
cmValue variableContent = GetOption(variableName);
- if (!variableContent)
+ if (!variableContent) {
return;
+ }
cmList list{ variableContent };
extensions.insert(list.begin(), list.end());
@@ -1204,8 +1209,9 @@ void cmCPackWIXGenerator::AddCustomFlags(std::string const& variableName,
std::ostream& stream)
{
cmValue variableContent = GetOption(variableName);
- if (!variableContent)
+ if (!variableContent) {
return;
+ }
cmList list{ variableContent };
diff --git a/Source/CPack/WiX/cmWIXAccessControlList.cxx b/Source/CPack/WiX/cmWIXAccessControlList.cxx
index 6aba228..cdb86c3 100644
--- a/Source/CPack/WiX/cmWIXAccessControlList.cxx
+++ b/Source/CPack/WiX/cmWIXAccessControlList.cxx
@@ -107,8 +107,9 @@ bool cmWIXAccessControlList::IsBooleanAttribute(std::string const& name)
size_t i = 0;
while (validAttributes[i]) {
- if (name == validAttributes[i++])
+ if (name == validAttributes[i++]) {
return true;
+ }
}
return false;
diff --git a/Source/CPack/WiX/cmWIXPatch.cxx b/Source/CPack/WiX/cmWIXPatch.cxx
index c3ada17..70033a3 100644
--- a/Source/CPack/WiX/cmWIXPatch.cxx
+++ b/Source/CPack/WiX/cmWIXPatch.cxx
@@ -26,8 +26,9 @@ void cmWIXPatch::ApplyFragment(std::string const& id,
cmWIXSourceWriter& writer)
{
cmWIXPatchParser::fragment_map_t::iterator i = Fragments.find(id);
- if (i == Fragments.end())
+ if (i == Fragments.end()) {
return;
+ }
const cmWIXPatchElement& fragment = i->second;
for (auto const& attr : fragment.attributes) {