comparison data/model/test/MockWaveModel.h @ 1580:c01cbe41aeb5 fix-static-analysis

Use override throughout
author Chris Cannam
date Mon, 26 Nov 2018 13:48:45 +0000
parents 54af1e21705c
children 82d03c9661f9
comparison
equal deleted inserted replaced
1579:232d6ddf257d 1580:c01cbe41aeb5
35 public: 35 public:
36 /** One Sort per channel! Length is in samples, and is in addition 36 /** One Sort per channel! Length is in samples, and is in addition
37 * to "pad" number of zero samples at the start and end */ 37 * to "pad" number of zero samples at the start and end */
38 MockWaveModel(std::vector<Sort> sorts, int length, int pad); 38 MockWaveModel(std::vector<Sort> sorts, int length, int pad);
39 39
40 virtual float getValueMinimum() const { return -1.f; } 40 float getValueMinimum() const override { return -1.f; }
41 virtual float getValueMaximum() const { return 1.f; } 41 float getValueMaximum() const override { return 1.f; }
42 virtual int getChannelCount() const { return int(m_data.size()); } 42 int getChannelCount() const override { return int(m_data.size()); }
43 43
44 virtual floatvec_t getData(int channel, sv_frame_t start, sv_frame_t count) const; 44 floatvec_t getData(int channel, sv_frame_t start, sv_frame_t count) const override;
45 virtual std::vector<floatvec_t> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const; 45 std::vector<floatvec_t> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const override;
46 46
47 virtual bool canPlay() const { return true; } 47 bool canPlay() const override { return true; }
48 virtual QString getDefaultPlayClipId() const { return ""; } 48 QString getDefaultPlayClipId() const override { return ""; }
49 49
50 virtual sv_frame_t getStartFrame() const { return 0; } 50 sv_frame_t getStartFrame() const override { return 0; }
51 virtual sv_frame_t getEndFrame() const { return m_data[0].size(); } 51 sv_frame_t getEndFrame() const override { return m_data[0].size(); }
52 virtual sv_samplerate_t getSampleRate() const { return 44100; } 52 sv_samplerate_t getSampleRate() const override { return 44100; }
53 virtual bool isOK() const { return true; } 53 bool isOK() const override { return true; }
54 54
55 QString getTypeName() const { return tr("Mock Wave"); } 55 QString getTypeName() const override { return tr("Mock Wave"); }
56 56
57 private: 57 private:
58 std::vector<std::vector<float> > m_data; 58 std::vector<std::vector<float> > m_data;
59 std::vector<float> generate(Sort sort, int length, int pad) const; 59 std::vector<float> generate(Sort sort, int length, int pad) const;
60 }; 60 };