diff options
author | David Robillard <d@drobilla.net> | 2020-11-27 17:57:42 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-27 21:42:51 +0100 |
commit | f9ff5a5586166ee2f44b43f347726f98c9a966af (patch) | |
tree | a6f13e24579d2f56e41744d15a27fe1250d532f4 /src/PatchageEvent.hpp | |
parent | 47e93d947c4b5a468802c168be087b8145a67c62 (diff) | |
download | patchage-f9ff5a5586166ee2f44b43f347726f98c9a966af.tar.gz patchage-f9ff5a5586166ee2f44b43f347726f98c9a966af.tar.bz2 patchage-f9ff5a5586166ee2f44b43f347726f98c9a966af.zip |
Use enum classes
Diffstat (limited to 'src/PatchageEvent.hpp')
-rw-r--r-- | src/PatchageEvent.hpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/PatchageEvent.hpp b/src/PatchageEvent.hpp index 3adae18..7376915 100644 --- a/src/PatchageEvent.hpp +++ b/src/PatchageEvent.hpp @@ -1,5 +1,5 @@ /* This file is part of Patchage. - * Copyright 2007-2014 David Robillard <http://drobilla.net> + * Copyright 2007-2020 David Robillard <d@drobilla.net> * * Patchage is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free @@ -38,7 +38,7 @@ class Patchage; class PatchageEvent { public: - enum Type + enum class Type : uint8_t { NULL_EVENT = 0, REFRESH, @@ -50,7 +50,7 @@ public: DISCONNECTION }; - explicit PatchageEvent(Type type = NULL_EVENT) + explicit PatchageEvent(Type type = Type::NULL_EVENT) : _str(nullptr) , _type(type) {} @@ -77,13 +77,13 @@ public: void execute(Patchage* patchage); - inline Type type() const { return (Type)_type; } + inline Type type() const { return _type; } private: - char* _str; - PortID _port_1; - PortID _port_2; - uint8_t _type; + char* _str; + PortID _port_1; + PortID _port_2; + Type _type; }; #endif // PATCHAGE_PATCHAGEEVENT_HPP |