Use modern for-loops in WebCore/Modules - 2
[WebKit-https.git] / Source / WebCore / Modules / mediastream / RTCDataChannel.cpp
index 90d06c7..827191c 100644 (file)
@@ -320,11 +320,8 @@ void RTCDataChannel::scheduledEventTimerFired()
     Vector<RefPtr<Event>> events;
     events.swap(m_scheduledEvents);
 
-    Vector<RefPtr<Event>>::iterator it = events.begin();
-    for (; it != events.end(); ++it)
-        dispatchEvent((*it).release());
-
-    events.clear();
+    for (auto& event : events)
+        dispatchEvent(event.release());
 }
 
 } // namespace WebCore