summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-11-22 19:11:07 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2022-11-29 17:39:45 (GMT)
commit4deab0a75c0da66938c230a446af5ecd6f3c5ca3 (patch)
treeda2a018bdb2564934dbea62c60111c5f55c5dbce /Source/cmVisualStudio10TargetGenerator.cxx
parent714a466eeb42809fa56d78d6aef6cde70d938af5 (diff)
downloadCMake-4deab0a75c0da66938c230a446af5ecd6f3c5ca3.zip
CMake-4deab0a75c0da66938c230a446af5ecd6f3c5ca3.tar.gz
CMake-4deab0a75c0da66938c230a446af5ecd6f3c5ca3.tar.bz2
clang-tidy: fix `readability-braces-around-statements` lints
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 28df926..810e587 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1031,8 +1031,9 @@ void cmVisualStudio10TargetGenerator::WriteCommonPropertyGroupGlobals(Elem& e1)
std::vector<std::string> keys = this->GeneratorTarget->GetPropertyKeys();
for (std::string const& keyIt : keys) {
static const cm::string_view prefix = "VS_GLOBAL_";
- if (!cmHasPrefix(keyIt, prefix))
+ if (!cmHasPrefix(keyIt, prefix)) {
continue;
+ }
cm::string_view globalKey = cm::string_view(keyIt).substr(prefix.length());
// Skip invalid or separately-handled properties.
if (globalKey.empty() || globalKey == "PROJECT_TYPES" ||
@@ -1040,8 +1041,9 @@ void cmVisualStudio10TargetGenerator::WriteCommonPropertyGroupGlobals(Elem& e1)
continue;
}
cmValue value = this->GeneratorTarget->GetProperty(keyIt);
- if (!value)
+ if (!value) {
continue;
+ }
e1.Element(globalKey, *value);
}
}
@@ -2399,8 +2401,9 @@ void cmVisualStudio10TargetGenerator::WriteSource(Elem& e2,
// added with the plain filename without any path. This means the file will
// show up at root-level of the csproj (where CMakeLists.txt etc. are).
std::string link = this->GetCSharpSourceLink(sf);
- if (link.empty())
+ if (link.empty()) {
link = cmsys::SystemTools::GetFilenameName(sf->GetFullPath());
+ }
e2.Element("Link", link);
}