summaryrefslogtreecommitdiffstats
path: root/src/server/ControlBindings.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-11 04:47:21 +0000
committerDavid Robillard <d@drobilla.net>2013-01-11 04:47:21 +0000
commit10e9a3a800a35916872abf9e354be4c554338e4e (patch)
treed6be3ce7993f5d8efd525629fd321b32a6341633 /src/server/ControlBindings.hpp
parent684eaf6b58e41f6758b160b882a6313faf0cff18 (diff)
downloadingen-10e9a3a800a35916872abf9e354be4c554338e4e.tar.gz
ingen-10e9a3a800a35916872abf9e354be4c554338e4e.tar.bz2
ingen-10e9a3a800a35916872abf9e354be4c554338e4e.zip
Use type safe enumerations.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4918 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/ControlBindings.hpp')
-rw-r--r--src/server/ControlBindings.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/ControlBindings.hpp b/src/server/ControlBindings.hpp
index 286dde15..630ec18a 100644
--- a/src/server/ControlBindings.hpp
+++ b/src/server/ControlBindings.hpp
@@ -36,7 +36,7 @@ class PortImpl;
class ControlBindings {
public:
- enum Type {
+ enum class Type {
NULL_CONTROL,
MIDI_BENDER,
MIDI_CC,
@@ -47,11 +47,11 @@ public:
};
struct Key {
- Key(Type t=NULL_CONTROL, int16_t n=0) : type(t), num(n) {}
+ Key(Type t=Type::NULL_CONTROL, int16_t n=0) : type(t), num(n) {}
inline bool operator<(const Key& other) const {
return (type == other.type) ? (num < other.num) : (type < other.type);
}
- inline operator bool() const { return type != NULL_CONTROL; }
+ inline operator bool() const { return type != Type::NULL_CONTROL; }
Type type;
int16_t num;
};