From 10e9a3a800a35916872abf9e354be4c554338e4e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 11 Jan 2013 04:47:21 +0000 Subject: Use type safe enumerations. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4918 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/internals/Note.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/internals/Note.hpp') diff --git a/src/server/internals/Note.hpp b/src/server/internals/Note.hpp index e8964c31..027912b6 100644 --- a/src/server/internals/Note.hpp +++ b/src/server/internals/Note.hpp @@ -64,8 +64,8 @@ public: private: /** Key, one for each key on the keyboard */ struct Key { - enum State { OFF, ON_ASSIGNED, ON_UNASSIGNED }; - Key() : state(OFF), voice(0), time(0) {} + enum class State { OFF, ON_ASSIGNED, ON_UNASSIGNED }; + Key() : state(State::OFF), voice(0), time(0) {} State state; uint32_t voice; SampleCount time; @@ -73,8 +73,8 @@ private: /** Voice, one of these always exists for each voice */ struct Voice { - enum State { FREE, ACTIVE, HOLDING }; - Voice() : state(FREE), note(0), time(0) {} + enum class State { FREE, ACTIVE, HOLDING }; + Voice() : state(State::FREE), note(0), time(0) {} State state; uint8_t note; SampleCount time; -- cgit v1.2.1