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/PortImpl.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server/PortImpl.hpp') 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 -- cgit v1.2.1