Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1669)

Unified Diff: storage/common/fileapi/file_system_util.cc

Issue 2070283002: Use container::back() and container::pop_back(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « storage/browser/fileapi/file_system_url_request_job_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/common/fileapi/file_system_util.cc
diff --git a/storage/common/fileapi/file_system_util.cc b/storage/common/fileapi/file_system_util.cc
index 3bb9b14f4f427ad08f9ea0879d17b36e9e9fb1c6..f3d7ddbfac3a42669b417ebfb48379710e59795b 100644
--- a/storage/common/fileapi/file_system_util.cc
+++ b/storage/common/fileapi/file_system_util.cc
@@ -38,7 +38,7 @@ base::FilePath VirtualPath::BaseName(const base::FilePath& virtual_path) {
// Keep everything after the final separator, but if the pathname is only
// one character and it's a separator, leave it alone.
- while (path.size() > 1 && base::FilePath::IsSeparator(path[path.size() - 1]))
+ while (path.size() > 1 && base::FilePath::IsSeparator(path.back()))
path.resize(path.size() - 1);
base::FilePath::StringType::size_type last_separator =
path.find_last_of(base::FilePath::kSeparators);
@@ -57,7 +57,7 @@ base::FilePath VirtualPath::DirName(const base::FilePath& virtual_path) {
// that this version never cares about '//' or drive-letters even on win32.
// Strip trailing separators.
- while (path.size() > 1 && base::FilePath::IsSeparator(path[path.size() - 1]))
+ while (path.size() > 1 && base::FilePath::IsSeparator(path.back()))
path.resize(path.size() - 1);
StringType::size_type last_separator =
@@ -74,7 +74,7 @@ base::FilePath VirtualPath::DirName(const base::FilePath& virtual_path) {
path.resize(last_separator);
// Strip trailing separators.
- while (path.size() > 1 && base::FilePath::IsSeparator(path[path.size() - 1]))
+ while (path.size() > 1 && base::FilePath::IsSeparator(path.back()))
path.resize(path.size() - 1);
if (path.empty())
« no previous file with comments | « storage/browser/fileapi/file_system_url_request_job_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698