summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-09-14 17:25:53 (GMT)
committerBrad King <brad.king@kitware.com>2018-09-14 17:25:53 (GMT)
commit49e7a82c90bd1ccd59089b6c0b1687c341e51d5e (patch)
tree5f2daa9caefb68a707130a4b75c50fc6ea1f9e38 /Source/kwsys/SystemTools.cxx
parent333804fa0e12c3df9ef16fec163451cffda52df4 (diff)
parentb13c8526b1f617f5dd146f42c6e1d48040cb527d (diff)
downloadCMake-49e7a82c90bd1ccd59089b6c0b1687c341e51d5e.zip
CMake-49e7a82c90bd1ccd59089b6c0b1687c341e51d5e.tar.gz
CMake-49e7a82c90bd1ccd59089b6c0b1687c341e51d5e.tar.bz2
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys: KWSys 2018-09-14 (1809bedd)
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r--Source/kwsys/SystemTools.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 476fe08..0a4ad7a 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -3640,11 +3640,11 @@ bool SystemTools::Split(const std::string& str,
while (lpos < data.length()) {
std::string::size_type rpos = data.find_first_of(separator, lpos);
if (rpos == std::string::npos) {
- // Line ends at end of string without a newline.
+ // String ends at end of string without a separator.
lines.push_back(data.substr(lpos));
return false;
} else {
- // Line ends in a "\n", remove the character.
+ // String ends in a separator, remove the character.
lines.push_back(data.substr(lpos, rpos - lpos));
}
lpos = rpos + 1;
@@ -3658,7 +3658,7 @@ bool SystemTools::Split(const std::string& str,
std::string data(str);
std::string::size_type lpos = 0;
while (lpos < data.length()) {
- std::string::size_type rpos = data.find_first_of("\n", lpos);
+ std::string::size_type rpos = data.find_first_of('\n', lpos);
if (rpos == std::string::npos) {
// Line ends at end of string without a newline.
lines.push_back(data.substr(lpos));