summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-10 16:36:24 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-10 16:36:24 (GMT)
commita16bf141bc5d393b27d13d8235d95a1b034052c2 (patch)
tree59ecd625114f6e98065e7901f418a28fc540cd45 /Source/cmSystemTools.cxx
parentbd9e551c1a13f566e6ffe8cdd1262b7628ed5330 (diff)
downloadCMake-a16bf141bc5d393b27d13d8235d95a1b034052c2.zip
CMake-a16bf141bc5d393b27d13d8235d95a1b034052c2.tar.gz
CMake-a16bf141bc5d393b27d13d8235d95a1b034052c2.tar.bz2
Add missing braces around statements.
Apply fixits of clang-tidy's readability-braces-around-statements checker.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 10c68d1..26cbfb6 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -228,14 +228,16 @@ std::string cmSystemTools::HelpFileName(std::string name)
std::string cmSystemTools::TrimWhitespace(const std::string& s)
{
std::string::const_iterator start = s.begin();
- while (start != s.end() && cm_isspace(*start))
+ while (start != s.end() && cm_isspace(*start)) {
++start;
- if (start == s.end())
+ }
+ if (start == s.end()) {
return "";
-
+ }
std::string::const_iterator stop = s.end() - 1;
- while (cm_isspace(*stop))
+ while (cm_isspace(*stop)) {
--stop;
+ }
return std::string(start, stop + 1);
}