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

Unified Diff: Source/core/html/HTMLMediaElement.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/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 3ffd916606a5ea6f02b9c26b6234b3f2abb35e44..74322e34fb6c88ce5c816c46a7494bbf62868138 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -3852,15 +3852,15 @@ void HTMLMediaElement::setMediaGroup(const AtomicString& group)
// 4. If there is another media element whose Document is the same as m's Document (even if one or both
// of these elements are not actually in the Document),
WeakMediaElementSet elements = documentToElementSetMap().get(&document());
- for (WeakMediaElementSet::iterator i = elements.begin(); i != elements.end(); ++i) {
- if (*i == this)
+ for (const auto& i : elements) {
sof 2014/10/21 09:58:43 Let's go with a longer name -- element?
riju_ 2014/11/04 17:50:52 Done.
+ if (i == this)
continue;
// and which also has a mediagroup attribute, and whose mediagroup attribute has the same value as
// the new value of m's mediagroup attribute,
- if ((*i)->mediaGroup() == group) {
+ if (i->mediaGroup() == group) {
// then let controller be that media element's current media controller.
- setControllerInternal((*i)->controller());
+ setControllerInternal(i->controller());
return;
}
}

Powered by Google App Engine
This is Rietveld 408576698