summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-09-12 14:20:00 (GMT)
committerBrad King <brad.king@kitware.com>2009-09-12 14:20:00 (GMT)
commitbcbb4626a338080ea535e0ab053d7e0f76cf7909 (patch)
treeded463843ee6519c66f1670569b386c765f3badb /Source
parentcde100544238bdc4e5e058552ad4d75328fb09d7 (diff)
downloadCMake-bcbb4626a338080ea535e0ab053d7e0f76cf7909.zip
CMake-bcbb4626a338080ea535e0ab053d7e0f76cf7909.tar.gz
CMake-bcbb4626a338080ea535e0ab053d7e0f76cf7909.tar.bz2
Avoid shadowing std::vector member
The cmProcess::Buffer class derives from std::vector. We were using local variable 'data' in the GetLine method but this name shadowed a member of vector with GNU. This renames it to 'text'.
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmProcess.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx
index f97f038..e49605e 100644
--- a/Source/CTest/cmProcess.cxx
+++ b/Source/CTest/cmProcess.cxx
@@ -82,10 +82,10 @@ bool cmProcess::Buffer::GetLine(std::string& line)
if((*this)[this->Last] == '\n' || (*this)[this->Last] == '\0')
{
// Extract the range first..last as a line.
- const char* data = &*this->begin() + this->First;
+ const char* text = &*this->begin() + this->First;
size_type length = this->Last - this->First;
- length -= (length && data[length-1] == '\r')? 1:0;
- line.assign(data, length);
+ length -= (length && text[length-1] == '\r')? 1:0;
+ line.assign(text, length);
// Start a new range for the next line.
++this->Last;