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/socket/Socket.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/socket/Socket.hpp')
-rw-r--r-- | src/socket/Socket.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/socket/Socket.hpp b/src/socket/Socket.hpp index 1406d87e..ed2ddb74 100644 --- a/src/socket/Socket.hpp +++ b/src/socket/Socket.hpp @@ -30,13 +30,13 @@ namespace Socket { /** A safe and simple interface for UNIX or TCP sockets. */ class Socket : public Raul::Noncopyable { public: - enum Type { + enum class Type { UNIX, TCP }; static Type type_from_uri(const Raul::URI uri) { - return (uri.scheme() == "unix") ? UNIX : TCP; + return (uri.scheme() == "unix") ? Type::UNIX : Type::TCP; } /** Create a new unbound/unconnected socket of a given type. */ |