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/cmOutputRequiredFilesCommand.cxx | |
parent | bfdd1ba604a31b3bb9f0baa29ce6fce467ee2e47 (diff) | |
download | cmake-c67ab22cdc680f6322e558b4f2c7cc74b6dbe163.tar.gz |
Using front() and back() instead of calculations
Diffstat (limited to 'Source/cmOutputRequiredFilesCommand.cxx')
-rw-r--r-- | Source/cmOutputRequiredFilesCommand.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx index e2de3f98ea..87c1ec055e 100644 --- a/Source/cmOutputRequiredFilesCommand.cxx +++ b/Source/cmOutputRequiredFilesCommand.cxx @@ -340,7 +340,7 @@ protected: } else { // try to guess which include path to use for (std::string incpath : this->IncludeDirectories) { - if (!incpath.empty() && incpath[incpath.size() - 1] != '/') { + if (!incpath.empty() && incpath.back() != '/') { incpath = incpath + "/"; } incpath = incpath + path; @@ -421,7 +421,7 @@ protected: } for (std::string path : this->IncludeDirectories) { - if (!path.empty() && path[path.size() - 1] != '/') { + if (!path.empty() && path.back() != '/') { path = path + "/"; } path = path + fname; @@ -435,7 +435,7 @@ protected: if (extraPath) { std::string path = extraPath; - if (!path.empty() && path[path.size() - 1] != '/') { + if (!path.empty() && path.back() != '/') { path = path + "/"; } path = path + fname; |