Use modern for-loops in WebCore/Modules - 2
[WebKit-https.git] / Source / WebCore / Modules / webaudio / WaveShaperProcessor.cpp
index c2d6de0..6ce5586 100644 (file)
@@ -65,9 +65,9 @@ void WaveShaperProcessor::setOversample(OverSampleType oversample)
     m_oversample = oversample;
 
     if (oversample != OverSampleNone) {
-        for (unsigned i = 0; i < m_kernels.size(); ++i) {
-            WaveShaperDSPKernel* kernel = static_cast<WaveShaperDSPKernel*>(m_kernels[i].get());
-            kernel->lazyInitializeOversampling();
+        for (auto& audioDSPKernel : m_kernels) {
+            WaveShaperDSPKernel& kernel = static_cast<WaveShaperDSPKernel&>(*audioDSPKernel);
+            kernel.lazyInitializeOversampling();
         }
     }
 }