[Cmake-commits] [cmake-commits] king committed cmProcess.cxx 1.15 1.16

cmake-commits at cmake.org cmake-commits at cmake.org
Sat Sep 12 10:20:04 EDT 2009


Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv2853/Source/CTest

Modified Files:
	cmProcess.cxx 
Log Message:
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'.


Index: cmProcess.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmProcess.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -C 2 -d -r1.15 -r1.16
*** cmProcess.cxx	11 Sep 2009 20:20:24 -0000	1.15
--- cmProcess.cxx	12 Sep 2009 14:20:00 -0000	1.16
***************
*** 83,90 ****
        {
        // Extract the range first..last as a line.
!       const char* data = &*this->begin() + this->First;
        size_type length = this->Last - this->First;
!       length -= (length && data[length-1] == '\r')? 1:0;
!       line.assign(data, length);
  
        // Start a new range for the next line.
--- 83,90 ----
        {
        // Extract the range first..last as a line.
!       const char* text = &*this->begin() + this->First;
        size_type length = this->Last - this->First;
!       length -= (length && text[length-1] == '\r')? 1:0;
!       line.assign(text, length);
  
        // Start a new range for the next line.



More information about the Cmake-commits mailing list