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/cmCacheManager.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/cmCacheManager.cxx')
-rw-r--r-- | Source/cmCacheManager.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index b391dc4..0305677 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -415,8 +415,7 @@ void cmCacheManager::OutputValueNoNewlines(std::ostream& fout, std::string const& value) { // if value has trailing space or tab, enclose it in single quotes - if (!value.empty() && - (value[value.size() - 1] == ' ' || value[value.size() - 1] == '\t')) { + if (!value.empty() && (value.back() == ' ' || value.back() == '\t')) { fout << '\'' << value << '\''; } else { fout << value; |