Mercurial > hg > svgui
comparison layer/SpectrogramLayer.cpp @ 1405:4c359c2b220c fix-static-analysis
Fixes from clang modernize-use-override
author | Chris Cannam |
---|---|
date | Thu, 22 Nov 2018 14:55:38 +0000 |
parents | 10e768adaee5 |
children | c8a6fd3f9dff |
comparison
equal
deleted
inserted
replaced
1404:a33d38247631 | 1405:4c359c2b220c |
---|---|
2312 { | 2312 { |
2313 public: | 2313 public: |
2314 SpectrogramRangeMapper(sv_samplerate_t sr, int /* fftsize */) : | 2314 SpectrogramRangeMapper(sv_samplerate_t sr, int /* fftsize */) : |
2315 m_dist(sr / 2), | 2315 m_dist(sr / 2), |
2316 m_s2(sqrt(sqrt(2))) { } | 2316 m_s2(sqrt(sqrt(2))) { } |
2317 ~SpectrogramRangeMapper() { } | 2317 ~SpectrogramRangeMapper() override { } |
2318 | 2318 |
2319 virtual int getPositionForValue(double value) const { | 2319 int getPositionForValue(double value) const override { |
2320 | 2320 |
2321 double dist = m_dist; | 2321 double dist = m_dist; |
2322 | 2322 |
2323 int n = 0; | 2323 int n = 0; |
2324 | 2324 |
2328 } | 2328 } |
2329 | 2329 |
2330 return n; | 2330 return n; |
2331 } | 2331 } |
2332 | 2332 |
2333 virtual int getPositionForValueUnclamped(double value) const { | 2333 int getPositionForValueUnclamped(double value) const override { |
2334 // We don't really support this | 2334 // We don't really support this |
2335 return getPositionForValue(value); | 2335 return getPositionForValue(value); |
2336 } | 2336 } |
2337 | 2337 |
2338 virtual double getValueForPosition(int position) const { | 2338 double getValueForPosition(int position) const override { |
2339 | 2339 |
2340 // Vertical zoom step 0 shows the entire range from DC -> | 2340 // Vertical zoom step 0 shows the entire range from DC -> |
2341 // Nyquist frequency. Step 1 shows 2^(1/4) of the range of | 2341 // Nyquist frequency. Step 1 shows 2^(1/4) of the range of |
2342 // step 0, and so on until the visible range is smaller than | 2342 // step 0, and so on until the visible range is smaller than |
2343 // the frequency step between bins at the current fft size. | 2343 // the frequency step between bins at the current fft size. |
2351 } | 2351 } |
2352 | 2352 |
2353 return dist; | 2353 return dist; |
2354 } | 2354 } |
2355 | 2355 |
2356 virtual double getValueForPositionUnclamped(int position) const { | 2356 double getValueForPositionUnclamped(int position) const override { |
2357 // We don't really support this | 2357 // We don't really support this |
2358 return getValueForPosition(position); | 2358 return getValueForPosition(position); |
2359 } | 2359 } |
2360 | 2360 |
2361 virtual QString getUnit() const { return "Hz"; } | 2361 QString getUnit() const override { return "Hz"; } |
2362 | 2362 |
2363 protected: | 2363 protected: |
2364 double m_dist; | 2364 double m_dist; |
2365 double m_s2; | 2365 double m_s2; |
2366 }; | 2366 }; |