summaryrefslogtreecommitdiffstats
path: root/Source/cmServerConnection.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-09-23 20:43:36 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-09-23 20:43:36 (GMT)
commit92207752dfaeeffe674946a7139475777ad90eac (patch)
treea4e54aa010e51888566330b5d5218d83751d3a11 /Source/cmServerConnection.cxx
parent6757e6608992354300d635a96fed29800a4856c3 (diff)
downloadCMake-92207752dfaeeffe674946a7139475777ad90eac.zip
CMake-92207752dfaeeffe674946a7139475777ad90eac.tar.gz
CMake-92207752dfaeeffe674946a7139475777ad90eac.tar.bz2
cmServer: add braces around conditional statements
Diffstat (limited to 'Source/cmServerConnection.cxx')
-rw-r--r--Source/cmServerConnection.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmServerConnection.cxx b/Source/cmServerConnection.cxx
index 112cafd..0b3db9f 100644
--- a/Source/cmServerConnection.cxx
+++ b/Source/cmServerConnection.cxx
@@ -146,8 +146,9 @@ void cmServerConnection::ReadData(const std::string& data)
}
std::string line = this->RawReadBuffer.substr(0, needle);
const auto ls = line.size();
- if (ls > 1 && line.at(ls - 1) == '\r')
+ if (ls > 1 && line.at(ls - 1) == '\r') {
line.erase(ls - 1, 1);
+ }
this->RawReadBuffer.erase(this->RawReadBuffer.begin(),
this->RawReadBuffer.begin() +
static_cast<long>(needle) + 1);