Using front() and back() instead of calculations

This commit is contained in:
Cengizhan Pasaoglu
2018-11-06 09:47:40 +03:00
parent bfdd1ba604
commit c67ab22cdc
33 changed files with 82 additions and 88 deletions
+1 -1
View File
@@ -2525,7 +2525,7 @@ bool cmFileCommand::HandleCMakePathCommand(
// remove double quotes in the path
std::string& s = *j;
if (s.size() > 1 && s[0] == '\"' && s[s.size() - 1] == '\"') {
if (s.size() > 1 && s.front() == '\"' && s.back() == '\"') {
s = s.substr(1, s.size() - 2);
}
}