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

Unified Diff: third_party/WebKit/Source/core/html/forms/EmailInputType.cpp

Issue 2556043002: Avoid WTF::Vector::at() and operator[] in core/html. (Closed)
Patch Set: _ Created 4 years 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
Index: third_party/WebKit/Source/core/html/forms/EmailInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp b/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp
index 8891afb63e7081218fa3a9b9f5d8f7df1f5cc55d..755ae39ddb5aa61af50616607431d2c6bdadbf52 100644
--- a/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/EmailInputType.cpp
@@ -186,8 +186,8 @@ String EmailInputType::findInvalidAddress(const String& value) const {
return isValidEmailAddress(ensureEmailRegexp(), value) ? String() : value;
Vector<String> addresses;
value.split(',', true, addresses);
- for (unsigned i = 0; i < addresses.size(); ++i) {
- String stripped = stripLeadingAndTrailingHTMLSpaces(addresses[i]);
+ for (const auto& address : addresses) {
+ String stripped = stripLeadingAndTrailingHTMLSpaces(address);
if (!isValidEmailAddress(ensureEmailRegexp(), stripped))
return stripped;
}
« no previous file with comments | « third_party/WebKit/Source/core/html/PublicURLManager.cpp ('k') | third_party/WebKit/Source/core/html/forms/FileInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698