diff options
Diffstat (limited to 'src/midimapper.cc')
-rw-r--r-- | src/midimapper.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/midimapper.cc b/src/midimapper.cc index 8df5901..05f69e5 100644 --- a/src/midimapper.cc +++ b/src/midimapper.cc @@ -28,14 +28,20 @@ int MidiMapper::lookup(int note) { - if(midimap.find(note) == midimap.end()) return -1; - std::string instr = midimap[note]; - if(instrmap.find(instr) == instrmap.end()) return -1; - return instrmap[instr]; + if(midimap.find(note) == midimap.end()) + { + return -1; + } + std::string instr = midimap[note]; + if(instrmap.find(instr) == instrmap.end()) + { + return -1; + } + return instrmap[instr]; } void MidiMapper::clear() { - midimap.clear(); - instrmap.clear(); + midimap.clear(); + instrmap.clear(); } |