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

Unified Diff: Source/core/html/HTMLFormElement.cpp

Issue 656723005: Use C++11 features in core/html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use meaningful names Created 6 years, 2 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
Index: Source/core/html/HTMLFormElement.cpp
diff --git a/Source/core/html/HTMLFormElement.cpp b/Source/core/html/HTMLFormElement.cpp
index 880b9adeb8a9de71c2e87bc0b52c31361df87af0..25a36a461d50b648b13c62d75d0e3dd8ce3985fb 100644
--- a/Source/core/html/HTMLFormElement.cpp
+++ b/Source/core/html/HTMLFormElement.cpp
@@ -790,10 +790,9 @@ void HTMLFormElement::removeFromPastNamesMap(HTMLElement& element)
{
if (!m_pastNamesMap)
return;
- PastNamesMap::iterator end = m_pastNamesMap->end();
- for (PastNamesMap::iterator it = m_pastNamesMap->begin(); it != end; ++it) {
- if (it->value == &element) {
- it->value = nullptr;
+ for (auto& it : *m_pastNamesMap) {
+ if (it.value == &element) {
+ it.value = nullptr;
// Keep looping. Single element can have multiple names.
}
}

Powered by Google App Engine
This is Rietveld 408576698