Browse Source

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'.
Brad King 16 years ago
parent
commit
bcbb4626a3
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Source/CTest/cmProcess.cxx

+ 3 - 3
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;