diff options
author | Cengizhan Pasaoglu <cengizhanpasaoglu@gmail.com> | 2018-11-06 06:47:40 (GMT) |
---|---|---|
committer | Cengizhan Pasaoglu <cengizhanpasaoglu@gmail.com> | 2018-11-06 18:43:33 (GMT) |
commit | c67ab22cdc680f6322e558b4f2c7cc74b6dbe163 (patch) | |
tree | 7197d12da074c751ad482f8dd9ed009a5f290198 /Source/cmCTest.cxx | |
parent | bfdd1ba604a31b3bb9f0baa29ce6fce467ee2e47 (diff) | |
download | CMake-c67ab22cdc680f6322e558b4f2c7cc74b6dbe163.zip CMake-c67ab22cdc680f6322e558b4f2c7cc74b6dbe163.tar.gz CMake-c67ab22cdc680f6322e558b4f2c7cc74b6dbe163.tar.bz2 |
Using front() and back() instead of calculations
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index d0d5db6..9a046db 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -727,7 +727,7 @@ bool cmCTest::UpdateCTestConfiguration() if (line.empty()) { continue; } - while (fin && (line[line.size() - 1] == '\\')) { + while (fin && (line.back() == '\\')) { line = line.substr(0, line.size() - 1); buffer[0] = 0; fin.getline(buffer, 1023); @@ -2575,7 +2575,7 @@ std::string cmCTest::GetShortPathToFile(const char* cfname) cmSystemTools::ConvertToUnixSlashes(*res); path = "./" + *res; - if (path[path.size() - 1] == '/') { + if (path.back() == '/') { path = path.substr(0, path.size() - 1); } } |