| Index: third_party/WebKit/Source/core/html/track/AutomaticTrackSelection.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/track/AutomaticTrackSelection.cpp b/third_party/WebKit/Source/core/html/track/AutomaticTrackSelection.cpp
|
| index ef7cc895e724b427d8d0a5b9295df000ac3c072f..651d79063da9e5a10cfdeca8fca508af274bff7a 100644
|
| --- a/third_party/WebKit/Source/core/html/track/AutomaticTrackSelection.cpp
|
| +++ b/third_party/WebKit/Source/core/html/track/AutomaticTrackSelection.cpp
|
| @@ -75,9 +75,7 @@ void AutomaticTrackSelection::performAutomaticTextTrackSelection(
|
| TextTrack* fallbackTrack = nullptr;
|
| int highestTrackScore = 0;
|
|
|
| - for (size_t i = 0; i < group.tracks.size(); ++i) {
|
| - TextTrack* textTrack = group.tracks[i];
|
| -
|
| + for (const auto& textTrack : group.tracks) {
|
| if (m_configuration.disableCurrentlyEnabledTracks &&
|
| textTrack->mode() == TextTrack::showingKeyword())
|
| currentlyEnabledTracks.append(textTrack);
|
| @@ -127,8 +125,7 @@ void AutomaticTrackSelection::performAutomaticTextTrackSelection(
|
| }
|
|
|
| if (currentlyEnabledTracks.size()) {
|
| - for (size_t i = 0; i < currentlyEnabledTracks.size(); ++i) {
|
| - TextTrack* textTrack = currentlyEnabledTracks[i];
|
| + for (const auto& textTrack : currentlyEnabledTracks) {
|
| if (textTrack != trackToEnable)
|
| textTrack->setMode(TextTrack::disabledKeyword());
|
| }
|
|
|