MidiControlListener: replaced static numActions by enum constant

It's not a good idea to have a separate constant determining the number
of items in an enumeration because you can easily get inconsistencies.
Use the last element of enumeration as NumActions constant instead.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This commit is contained in:
Tobias Doerffel
2009-06-01 11:07:05 +02:00
parent 21c669e6b3
commit 7a65687746
3 changed files with 21 additions and 18 deletions

View File

@@ -47,9 +47,9 @@ public:
ActionStop,
ActionToggleLoop,
ActionJumpToLoopStart,
ActionJumpToLoopEnd
ActionJumpToLoopEnd,
NumActions
} EventAction;
static const int numActions = 7;
typedef QMap<int, EventAction> ActionMap;