diff options
author | Cengizhan Pasaoglu <cengizhanpasaoglu@gmail.com> | 2018-11-06 06:47:40 (GMT) |
---|---|---|
committer | Cengizhan Pasaoglu <cengizhanpasaoglu@gmail.com> | 2018-11-06 18:43:33 (GMT) |
commit | c67ab22cdc680f6322e558b4f2c7cc74b6dbe163 (patch) | |
tree | 7197d12da074c751ad482f8dd9ed009a5f290198 /Source/cmSystemTools.cxx | |
parent | bfdd1ba604a31b3bb9f0baa29ce6fce467ee2e47 (diff) | |
download | CMake-c67ab22cdc680f6322e558b4f2c7cc74b6dbe163.zip CMake-c67ab22cdc680f6322e558b4f2c7cc74b6dbe163.tar.gz CMake-c67ab22cdc680f6322e558b4f2c7cc74b6dbe163.tar.bz2 |
Using front() and back() instead of calculations
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 568ee82..9866d13 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1301,7 +1301,7 @@ bool cmSystemTools::SimpleGlob(const std::string& glob, int type /* = 0 */) { files.clear(); - if (glob[glob.size() - 1] != '*') { + if (glob.back() != '*') { return false; } std::string path = cmSystemTools::GetFilenamePath(glob); @@ -1318,7 +1318,7 @@ bool cmSystemTools::SimpleGlob(const std::string& glob, if ((std::string(d.GetFile(i)) != ".") && (std::string(d.GetFile(i)) != "..")) { std::string fname = path; - if (path[path.size() - 1] != '/') { + if (path.back() != '/') { fname += "/"; } fname += d.GetFile(i); |