summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmProcess.cxx
diff options
context:
space:
mode:
authorArtur Ryt <artur.ryt@gmail.com>2019-02-04 21:56:42 (GMT)
committerBrad King <brad.king@kitware.com>2019-02-06 15:43:16 (GMT)
commitf3534386b504430aec926e46a413b044ff64d769 (patch)
treecb29c859cee6cdc69c0d8b25d719b4096be53ff8 /Source/CTest/cmProcess.cxx
parent062cfd991faac000d484c74e5af7d65726c655dc (diff)
downloadCMake-f3534386b504430aec926e46a413b044ff64d769.zip
CMake-f3534386b504430aec926e46a413b044ff64d769.tar.gz
CMake-f3534386b504430aec926e46a413b044ff64d769.tar.bz2
Prefer front/back/data over dereferencing begin/rbegin iter
Changed for sequenced containers: vector, list, string and array
Diffstat (limited to 'Source/CTest/cmProcess.cxx')
-rw-r--r--Source/CTest/cmProcess.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx
index 70ef8df..c03d004 100644
--- a/Source/CTest/cmProcess.cxx
+++ b/Source/CTest/cmProcess.cxx
@@ -199,7 +199,7 @@ bool cmProcess::Buffer::GetLine(std::string& line)
for (size_type sz = this->size(); this->Last != sz; ++this->Last) {
if ((*this)[this->Last] == '\n' || (*this)[this->Last] == '\0') {
// Extract the range first..last as a line.
- const char* text = &*this->begin() + this->First;
+ const char* text = this->data() + this->First;
size_type length = this->Last - this->First;
while (length && text[length - 1] == '\r') {
length--;
@@ -229,7 +229,7 @@ bool cmProcess::Buffer::GetLast(std::string& line)
{
// Return the partial last line, if any.
if (!this->empty()) {
- line.assign(&*this->begin(), this->size());
+ line.assign(this->data(), this->size());
this->First = this->Last = 0;
this->clear();
return true;