From e83d72432823f3efc7a5a1d2eba5674286580b54 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 29 Oct 2025 01:02:11 +0100 Subject: Switch to a default value. --- src/wx/audio_plot.h | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/wx/audio_plot.h b/src/wx/audio_plot.h index aec7edfba..fe7821e33 100644 --- a/src/wx/audio_plot.h +++ b/src/wx/audio_plot.h @@ -37,14 +37,14 @@ class AudioPlot : public wxPanel public: explicit AudioPlot(wxWindow* parent); - void set_analysis (std::shared_ptr); - void set_channel_visible (int c, bool v); - void set_type_visible (int t, bool v); - void set_smoothing (int); - void set_message (wxString); - void set_gain_correction (double gain); + void set_analysis(std::shared_ptr); + void set_channel_visible(int c, bool v); + void set_type_visible(int t, bool v); + void set_smoothing(int); + void set_message(wxString); + void set_gain_correction(double gain); - wxColour colour (int n) const; + wxColour colour(int n) const; boost::signals2::signal, boost::optional)> Cursor; boost::signals2::signal Click; @@ -54,11 +54,9 @@ public: private: struct Point { - Point () - : db(0) - {} + Point() = default; - Point (wxPoint draw_, dcpomatic::DCPTime time_, float db_) + Point(wxPoint draw_, dcpomatic::DCPTime time_, float db_) : draw(draw_) , time(time_) , db(db_) @@ -66,19 +64,19 @@ private: wxPoint draw; dcpomatic::DCPTime time; - float db; + float db = 0; }; typedef std::vector PointList; - void paint (); - void plot_peak (wxGraphicsPath &, int, Metrics const &) const; - void plot_rms (wxGraphicsPath &, int, Metrics const &) const; + void paint(); + void plot_peak(wxGraphicsPath &, int, Metrics const &) const; + void plot_rms(wxGraphicsPath &, int, Metrics const &) const; float y_for_linear (float, Metrics const &) const; - AudioPoint get_point (int channel, int point) const; - void left_down (); - void mouse_moved (wxMouseEvent& ev); - void mouse_leave (wxMouseEvent& ev); + AudioPoint get_point(int channel, int point) const; + void left_down(); + void mouse_moved(wxMouseEvent& ev); + void mouse_leave(wxMouseEvent& ev); std::shared_ptr _analysis; bool _channel_visible[MAX_DCP_AUDIO_CHANNELS]; -- cgit v1.2.3