From c67ab22cdc680f6322e558b4f2c7cc74b6dbe163 Mon Sep 17 00:00:00 2001 From: Cengizhan Pasaoglu Date: Tue, 6 Nov 2018 09:47:40 +0300 Subject: Using front() and back() instead of calculations --- Source/cmFindCommon.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/cmFindCommon.cxx') 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()) { -- cgit v1.2.1