From 3245a89bfe2764d9029bac3d06b5f63b13e9fd72 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 22 Jun 2022 13:30:16 -0600 Subject: [PATCH] add comment explaining non-idiomatic C++ --- gtk2_ardour/region_peak_cursor.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk2_ardour/region_peak_cursor.cc b/gtk2_ardour/region_peak_cursor.cc index 27b18ad74d..42374ad038 100644 --- a/gtk2_ardour/region_peak_cursor.cc +++ b/gtk2_ardour/region_peak_cursor.cc @@ -97,8 +97,12 @@ RegionPeakCursor::set (AudioRegionView* arv, samplepos_t when, samplecnt_t sampl s += ar->start_sample (); PeakData p; + + /* no default constructor, since PeakData is POD */ + p.min = 0; p.max = 0; + for (uint32_t chn = 0; chn < ar->n_channels (); ++chn) { PeakData pc; ar->read_peaks (&pc, 1, s, samples_per_pixel, chn, samples_per_pixel);