diff data/model/WaveformOversampler.cpp @ 1745:074b860a7828 by-id

Use reference rather than bare pointer
author Chris Cannam
date Tue, 02 Jul 2019 14:08:25 +0100
parents ca43af0dcab7
children
line wrap: on
line diff
--- a/data/model/WaveformOversampler.cpp	Tue Jul 02 11:49:28 2019 +0100
+++ b/data/model/WaveformOversampler.cpp	Tue Jul 02 14:08:25 2019 +0100
@@ -19,7 +19,7 @@
 #include "data/model/DenseTimeValueModel.h"
 
 floatvec_t
-WaveformOversampler::getOversampledData(const DenseTimeValueModel *source,
+WaveformOversampler::getOversampledData(const DenseTimeValueModel &source,
                                         int channel,
                                         sv_frame_t sourceStartFrame,
                                         sv_frame_t sourceFrameCount,
@@ -53,14 +53,14 @@
 }
 
 floatvec_t
-WaveformOversampler::getFixedRatioData(const DenseTimeValueModel *source,
+WaveformOversampler::getFixedRatioData(const DenseTimeValueModel &source,
                                        int channel,
                                        sv_frame_t sourceStartFrame,
                                        sv_frame_t sourceFrameCount)
 {
     Profiler profiler("WaveformOversampler::getFixedRatioData");
     
-    sv_frame_t sourceLength = source->getEndFrame();
+    sv_frame_t sourceLength = source.getEndFrame();
     
     if (sourceStartFrame + sourceFrameCount > sourceLength) {
         sourceFrameCount = sourceLength - sourceStartFrame;
@@ -84,7 +84,7 @@
         i1 = sourceLength;
     }
     
-    floatvec_t sourceData = source->getData(channel, i0, i1 - i0);
+    floatvec_t sourceData = source.getData(channel, i0, i1 - i0);
     
     for (sv_frame_t i = i0; i < i1; ++i) {
         float v = sourceData[i - i0];