diff options
author | Christian Glöckner <cgloeckner@freenet.de> | 2016-03-29 10:18:31 +0200 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2016-03-31 17:35:47 +0200 |
commit | c551d2720a7c9c8071e8c980bde1daeec9048bdc (patch) | |
tree | f174d14cb3dbf24fd783fdbda02568f0e06afb47 /src | |
parent | 0f18336bc2a597f2625a46ea714e838d03e340b2 (diff) |
more consistent style of input engines' getters
Diffstat (limited to 'src')
-rw-r--r-- | src/audioinputengine.h | 2 | ||||
-rw-r--r-- | src/audioinputenginemidi.cc | 4 | ||||
-rw-r--r-- | src/audioinputenginemidi.h | 6 | ||||
-rw-r--r-- | src/drumgizmo.cc | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/audioinputengine.h b/src/audioinputengine.h index 105db49..1701864 100644 --- a/src/audioinputengine.h +++ b/src/audioinputengine.h @@ -38,7 +38,7 @@ class AudioInputEngine { public: virtual ~AudioInputEngine() {} - virtual bool isMidiEngine() { return false; } + virtual bool isMidiEngine() const { return false; } virtual bool init(const Instruments& instruments) = 0; diff --git a/src/audioinputenginemidi.cc b/src/audioinputenginemidi.cc index e18e446..80cb13a 100644 --- a/src/audioinputenginemidi.cc +++ b/src/audioinputenginemidi.cc @@ -76,12 +76,12 @@ bool AudioInputEngineMidi::loadMidiMap(const std::string& file, const Instrument return true; } -std::string AudioInputEngineMidi::midimapFile() +std::string AudioInputEngineMidi::getMidimapFile() const { return midimap; } -bool AudioInputEngineMidi::isValid() +bool AudioInputEngineMidi::isValid() const { return is_valid; } diff --git a/src/audioinputenginemidi.h b/src/audioinputenginemidi.h index 82121b7..b892750 100644 --- a/src/audioinputenginemidi.h +++ b/src/audioinputenginemidi.h @@ -41,7 +41,7 @@ public: AudioInputEngineMidi(); virtual ~AudioInputEngineMidi() {} - bool isMidiEngine() { return true; } + bool isMidiEngine() const { return true; } virtual bool init(const Instruments &instruments) = 0; @@ -56,9 +56,9 @@ public: bool loadMidiMap(const std::string& file, const Instruments& i); - std::string midimapFile(); + std::string getMidimapFile() const; - bool isValid(); + bool isValid() const; protected: MidiMapper mmap; diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc index 51cee18..a3e5540 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -160,7 +160,7 @@ void DrumGizmo::handleMessage(Message *msg) if(ie->isMidiEngine()) { AudioInputEngineMidi *aim = (AudioInputEngineMidi*)ie; - mmapfile = aim->midimapFile(); + mmapfile = aim->getMidimapFile(); mmap_loaded = aim->isValid(); } @@ -683,7 +683,7 @@ std::string DrumGizmo::configString() if(ie->isMidiEngine()) { AudioInputEngineMidi *aim = (AudioInputEngineMidi*)ie; - mmapfile = aim->midimapFile(); + mmapfile = aim->getMidimapFile(); } return |