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

Unified Diff: Source/core/html/forms/RadioButtonGroupScope.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/forms/RadioButtonGroupScope.cpp
diff --git a/Source/core/html/forms/RadioButtonGroupScope.cpp b/Source/core/html/forms/RadioButtonGroupScope.cpp
index 4e4c55a50d4bfef96213a4bceae6ebecd33ac5cb..c2deda3266fb1726f6011ac83d42961790aa0444 100644
--- a/Source/core/html/forms/RadioButtonGroupScope.cpp
+++ b/Source/core/html/forms/RadioButtonGroupScope.cpp
@@ -113,10 +113,8 @@ void RadioButtonGroup::updateCheckedState(HTMLInputElement* button)
}
if (wasValid != isValid())
setNeedsValidityCheckForAllButtons();
- typedef WillBeHeapHashSet<RawPtrWillBeMember<HTMLInputElement> >::const_iterator Iterator;
- Iterator end = m_members.end();
- for (Iterator it = m_members.begin(); it != end; ++it) {
- (*it)->pseudoStateChanged(CSSSelector::PseudoIndeterminate);
+ for (const auto& inputElement : m_members) {
+ inputElement->pseudoStateChanged(CSSSelector::PseudoIndeterminate);
}
}
@@ -165,10 +163,8 @@ void RadioButtonGroup::remove(HTMLInputElement* button)
void RadioButtonGroup::setNeedsValidityCheckForAllButtons()
{
- typedef WillBeHeapHashSet<RawPtrWillBeMember<HTMLInputElement> >::const_iterator Iterator;
- Iterator end = m_members.end();
- for (Iterator it = m_members.begin(); it != end; ++it) {
- HTMLInputElement* button = *it;
+ for (const auto& inputElement : m_members) {
+ HTMLInputElement* button = inputElement;
ASSERT(button->type() == InputTypeNames::radio);
button->setNeedsValidityCheck();
}

Powered by Google App Engine
This is Rietveld 408576698