summaryrefslogtreecommitdiff
path: root/Source/cmFindCommon.cxx
diff options
context:
space:
mode:
authorCengizhan Pasaoglu <cengizhanpasaoglu@gmail.com>2018-11-06 09:47:40 +0300
committerCengizhan Pasaoglu <cengizhanpasaoglu@gmail.com>2018-11-06 21:43:33 +0300
commitc67ab22cdc680f6322e558b4f2c7cc74b6dbe163 (patch)
tree7197d12da074c751ad482f8dd9ed009a5f290198 /Source/cmFindCommon.cxx
parentbfdd1ba604a31b3bb9f0baa29ce6fce467ee2e47 (diff)
downloadcmake-c67ab22cdc680f6322e558b4f2c7cc74b6dbe163.tar.gz
Using front() and back() instead of calculations
Diffstat (limited to 'Source/cmFindCommon.cxx')
-rw-r--r--Source/cmFindCommon.cxx4
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()) {