summaryrefslogtreecommitdiff
path: root/Source/cmcldeps.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/cmcldeps.cxx
parentbfdd1ba604a31b3bb9f0baa29ce6fce467ee2e47 (diff)
downloadcmake-c67ab22cdc680f6322e558b4f2c7cc74b6dbe163.tar.gz
Using front() and back() instead of calculations
Diffstat (limited to 'Source/cmcldeps.cxx')
-rw-r--r--Source/cmcldeps.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx
index 0c5bbe2df3..1a10666c57 100644
--- a/Source/cmcldeps.cxx
+++ b/Source/cmcldeps.cxx
@@ -221,7 +221,7 @@ static int process(const std::string& srcfilename, const std::string& dfile,
while (std::getline(ss, line)) {
if (startsWith(line, prefix)) {
std::string inc = trimLeadingSpace(line.substr(prefix.size()).c_str());
- if (inc[inc.size() - 1] == '\r') // blech, stupid \r\n
+ if (inc.back() == '\r') // blech, stupid \r\n
inc = inc.substr(0, inc.size() - 1);
includes.push_back(inc);
} else {