diff options
author | David Robillard <d@drobilla.net> | 2013-01-11 04:47:21 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-01-11 04:47:21 +0000 |
commit | 10e9a3a800a35916872abf9e354be4c554338e4e (patch) | |
tree | d6be3ce7993f5d8efd525629fd321b32a6341633 /src/server/PortImpl.hpp | |
parent | 684eaf6b58e41f6758b160b882a6313faf0cff18 (diff) | |
download | ingen-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/PortImpl.hpp')
-rw-r--r-- | src/server/PortImpl.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp index 428a628b..4aed4458 100644 --- a/src/server/PortImpl.hpp +++ b/src/server/PortImpl.hpp @@ -45,7 +45,7 @@ class PortImpl : public NodeImpl public: ~PortImpl(); - virtual GraphType graph_type() const { return PORT; } + virtual GraphType graph_type() const { return GraphType::PORT; } /** A port's parent is always a block, so static cast should be safe */ BlockImpl* parent_block() const { return (BlockImpl*)_parent; } @@ -181,9 +181,9 @@ protected: size_t buffer_size); struct SetState { - enum State { SET, HALF_SET_CYCLE_1, HALF_SET_CYCLE_2 }; + enum class State { SET, HALF_SET_CYCLE_1, HALF_SET_CYCLE_2 }; - SetState() : state(SET), value(0), time(0) {} + SetState() : state(State::SET), value(0), time(0) {} State state; ///< State of buffer for setting control value Sample value; ///< Value currently being set |