# HG changeset patch # User Chris Cannam # Date 1542898538 0 # Node ID 4c359c2b220cfb1d0912f0d4fceb878591994eeb # Parent a33d38247631ec96dc048ccc2fa0c4af0093f50b Fixes from clang modernize-use-override diff -r a33d38247631 -r 4c359c2b220c layer/SpectrogramLayer.cpp --- a/layer/SpectrogramLayer.cpp Fri Nov 16 09:01:38 2018 +0000 +++ b/layer/SpectrogramLayer.cpp Thu Nov 22 14:55:38 2018 +0000 @@ -2314,9 +2314,9 @@ SpectrogramRangeMapper(sv_samplerate_t sr, int /* fftsize */) : m_dist(sr / 2), m_s2(sqrt(sqrt(2))) { } - ~SpectrogramRangeMapper() { } + ~SpectrogramRangeMapper() override { } - virtual int getPositionForValue(double value) const { + int getPositionForValue(double value) const override { double dist = m_dist; @@ -2330,12 +2330,12 @@ return n; } - virtual int getPositionForValueUnclamped(double value) const { + int getPositionForValueUnclamped(double value) const override { // We don't really support this return getPositionForValue(value); } - virtual double getValueForPosition(int position) const { + double getValueForPosition(int position) const override { // Vertical zoom step 0 shows the entire range from DC -> // Nyquist frequency. Step 1 shows 2^(1/4) of the range of @@ -2353,12 +2353,12 @@ return dist; } - virtual double getValueForPositionUnclamped(int position) const { + double getValueForPositionUnclamped(int position) const override { // We don't really support this return getValueForPosition(position); } - virtual QString getUnit() const { return "Hz"; } + QString getUnit() const override { return "Hz"; } protected: double m_dist; diff -r a33d38247631 -r 4c359c2b220c layer/WaveformLayer.cpp --- a/layer/WaveformLayer.cpp Fri Nov 16 09:01:38 2018 +0000 +++ b/layer/WaveformLayer.cpp Thu Nov 22 14:55:38 2018 +0000 @@ -919,9 +919,9 @@ case MeterScale: if (!mergingChannels) { - double r0 = fabs(AudioLevel::multiplier_to_preview + double r0 = std::abs(AudioLevel::multiplier_to_preview (range.min() * gain, m)); - double r1 = fabs(AudioLevel::multiplier_to_preview + double r1 = std::abs(AudioLevel::multiplier_to_preview (range.max() * gain, m)); rangeTop = std::max(r0, r1); meanTop = std::min(r0, r1);