summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorCengizhan Pasaoglu <cengizhanpasaoglu@gmail.com>2018-11-06 06:47:40 (GMT)
committerCengizhan Pasaoglu <cengizhanpasaoglu@gmail.com>2018-11-06 18:43:33 (GMT)
commitc67ab22cdc680f6322e558b4f2c7cc74b6dbe163 (patch)
tree7197d12da074c751ad482f8dd9ed009a5f290198 /Source/cmGeneratorTarget.cxx
parentbfdd1ba604a31b3bb9f0baa29ce6fce467ee2e47 (diff)
downloadCMake-c67ab22cdc680f6322e558b4f2c7cc74b6dbe163.zip
CMake-c67ab22cdc680f6322e558b4f2c7cc74b6dbe163.tar.gz
CMake-c67ab22cdc680f6322e558b4f2c7cc74b6dbe163.tar.bz2
Using front() and back() instead of calculations
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 71947ea..1663400 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -953,7 +953,7 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetSourceFilePaths(
cmSystemTools::ExpandListArgument(entry, items);
for (std::string const& item : items) {
if (cmHasLiteralPrefix(item, "$<TARGET_OBJECTS:") &&
- item[item.size() - 1] == '>') {
+ item.back() == '>') {
continue;
}
files.push_back(item);
@@ -5612,8 +5612,7 @@ void cmGeneratorTarget::GetObjectLibrariesCMP0026(
std::vector<std::string> files;
cmSystemTools::ExpandListArgument(entry, files);
for (std::string const& li : files) {
- if (cmHasLiteralPrefix(li, "$<TARGET_OBJECTS:") &&
- li[li.size() - 1] == '>') {
+ if (cmHasLiteralPrefix(li, "$<TARGET_OBJECTS:") && li.back() == '>') {
std::string objLibName = li.substr(17, li.size() - 18);
if (cmGeneratorExpression::Find(objLibName) != std::string::npos) {