summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorMatthias Maennich <matthias@maennich.net>2017-09-20 21:53:14 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-28 11:23:43 (GMT)
commit77f674be35717a6eb296246733885b5a7ddf95ec (patch)
tree308de087b0babb7799c8c99c4352faa158969012 /Source/CPack
parentf0bab294dcd3f2c4f3be5e491426b5eefb2a9aba (diff)
downloadCMake-77f674be35717a6eb296246733885b5a7ddf95ec.zip
CMake-77f674be35717a6eb296246733885b5a7ddf95ec.tar.gz
CMake-77f674be35717a6eb296246733885b5a7ddf95ec.tar.bz2
Fix some occurrences of readability-braces-around-statements
Fix issues diagnosed by clang-tidy [readability-braces-around-statements] Signed-off-by: Matthias Maennich <matthias@maennich.net>
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx3
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.cxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index 72ddd6a..45c7fc6 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -866,10 +866,11 @@ bool cmCPackDragNDropGenerator::BreakLongLine(const std::string& line,
size_t line_length = max_line_length;
if (i + line_length > line.size()) {
line_length = line.size() - i;
- } else
+ } else {
while (line_length > 0 && line[i + line_length - 1] != ' ') {
line_length = line_length - 1;
}
+ }
if (line_length == 0) {
*error = "Please make sure there are no words "
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx
index 6624b16..0299279 100644
--- a/Source/CPack/cmCPackPackageMakerGenerator.cxx
+++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx
@@ -275,8 +275,9 @@ int cmCPackPackageMakerGenerator::PackageFiles()
if (this->PackageMakerVersion > 2.0) {
pkgCmd << " -v";
}
- if (!RunPackageMaker(pkgCmd.str().c_str(), packageDirFileName.c_str()))
+ if (!RunPackageMaker(pkgCmd.str().c_str(), packageDirFileName.c_str())) {
return 0;
+ }
} else {
// We have built the package in place. Generate the
// distribution.dist file to describe it for the installer.