diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-12-15 23:32:21 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-12-15 23:32:21 (GMT) |
commit | d9658c15bc3682128618402b909ee9e618c3db07 (patch) | |
tree | 3293690e77447dfc39102ab5567b9d3a1717494b | |
parent | 652b162a297d33d3bf4060a5bcfea541f392e972 (diff) | |
download | CMake-d9658c15bc3682128618402b909ee9e618c3db07.zip CMake-d9658c15bc3682128618402b909ee9e618c3db07.tar.gz CMake-d9658c15bc3682128618402b909ee9e618c3db07.tar.bz2 |
ERR: Ok, think before commit... This fixes two build problems. The missing brace and the std::string signature is different on gcc 2.95 and gcc 3.3.
-rw-r--r-- | Source/cmCTest.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index af5b608..573e6ea 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1396,14 +1396,16 @@ int cmCTest::CoverageDirectory() cov.m_Show = true; } std::string::size_type kk; - for ( kk = 0; kk < lines.size(); kk ++ ) // std::cerr << "number of lines " << lines.size() << "\n"; + for ( kk = 0; kk < lines.size(); kk ++ ) + { std::string& line = lines[kk]; //std::cerr << line << "\n"; - std::string sub = line.substr(0, strlen(" ######")); - int count = atoi(sub.c_str()); - if ( sub.compare(0, strlen(" #####"), " #####") == 0 - || sub.compare(" ######") == 0 ) + std::string sub1 = line.substr(0, strlen(" #####")); + std::string sub2 = line.substr(0, strlen(" ######")); + int count = atoi(sub2.c_str()); + if ( sub1.compare(" #####") == 0 || + sub2.compare(" ######") == 0 ) { if ( covlines[kk] == -1 ) { |