diff options
author | Cengizhan Pasaoglu <cengizhanpasaoglu@gmail.com> | 2018-11-06 09:47:40 +0300 |
---|---|---|
committer | Cengizhan Pasaoglu <cengizhanpasaoglu@gmail.com> | 2018-11-06 21:43:33 +0300 |
commit | c67ab22cdc680f6322e558b4f2c7cc74b6dbe163 (patch) | |
tree | 7197d12da074c751ad482f8dd9ed009a5f290198 /Source/cmFindCommon.cxx | |
parent | bfdd1ba604a31b3bb9f0baa29ce6fce467ee2e47 (diff) | |
download | cmake-c67ab22cdc680f6322e558b4f2c7cc74b6dbe163.tar.gz |
Using front() and back() instead of calculations
Diffstat (limited to 'Source/cmFindCommon.cxx')
-rw-r--r-- | Source/cmFindCommon.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx index fbaacfcf5a..009f0e3e3e 100644 --- a/Source/cmFindCommon.cxx +++ b/Source/cmFindCommon.cxx @@ -293,13 +293,13 @@ void cmFindCommon::AddPathSuffix(std::string const& arg) if (suffix.empty()) { return; } - if (suffix[0] == '/') { + if (suffix.front() == '/') { suffix = suffix.substr(1); } if (suffix.empty()) { return; } - if (suffix[suffix.size() - 1] == '/') { + if (suffix.back() == '/') { suffix = suffix.substr(0, suffix.size() - 1); } if (suffix.empty()) { |