Mercurial > hg > svgui
changeset 1405:4c359c2b220c fix-static-analysis
Fixes from clang modernize-use-override
author | Chris Cannam |
---|---|
date | Thu, 22 Nov 2018 14:55:38 +0000 |
parents | a33d38247631 |
children | a18e78b9c78b |
files | layer/SpectrogramLayer.cpp layer/WaveformLayer.cpp |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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);