summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
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);
}