diff options
author | David Robillard <d@drobilla.net> | 2020-02-09 14:34:20 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-02-09 14:34:20 +0100 |
commit | af5ec4bdda21e9a2f76f22050216a0b1cbbed575 (patch) | |
tree | f93ddc033b70297abb472f7e28a06f9e936cf0ee /src/PatchageEvent.hpp | |
parent | c321c02a6b9c67b4b106e36a77167ee279b9ef78 (diff) | |
download | patchage-af5ec4bdda21e9a2f76f22050216a0b1cbbed575.tar.gz patchage-af5ec4bdda21e9a2f76f22050216a0b1cbbed575.tar.bz2 patchage-af5ec4bdda21e9a2f76f22050216a0b1cbbed575.zip |
Format all code with clang-format
This configuration tries to get as close to the previous style as possible so
the changes aren't too dramatic. It's still far from ideal and the code could
use some adaptation, but this makes things much easier to work on.
Diffstat (limited to 'src/PatchageEvent.hpp')
-rw-r--r-- | src/PatchageEvent.hpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/src/PatchageEvent.hpp b/src/PatchageEvent.hpp index 4fe0bf3..2c9efb4 100644 --- a/src/PatchageEvent.hpp +++ b/src/PatchageEvent.hpp @@ -23,10 +23,10 @@ #include "PortID.hpp" #ifdef PATCHAGE_LIBJACK - #include <jack/jack.h> +# include <jack/jack.h> #endif #ifdef HAVE_ALSA - #include <alsa/asoundlib.h> +# include <alsa/asoundlib.h> #endif #include <cstring> @@ -35,9 +35,11 @@ class Patchage; /** A Driver event to be processed by the GUI thread. */ -class PatchageEvent { +class PatchageEvent +{ public: - enum Type { + enum Type + { NULL_EVENT = 0, REFRESH, CLIENT_CREATION, @@ -48,29 +50,29 @@ public: DISCONNECTION }; - explicit PatchageEvent(Type type=NULL_EVENT) - : _str(NULL) - , _type(type) + explicit PatchageEvent(Type type = NULL_EVENT) + : _str(NULL) + , _type(type) {} PatchageEvent(Type type, const char* str) - : _str(g_strdup(str)) - , _type(type) + : _str(g_strdup(str)) + , _type(type) {} - template <typename P> + template<typename P> PatchageEvent(Type type, P port) - : _str(NULL) - , _port_1(port) - , _type(type) + : _str(NULL) + , _port_1(port) + , _type(type) {} - template <typename P> + template<typename P> PatchageEvent(Type type, P port_1, P port_2) - : _str(NULL) - , _port_1(port_1, false) - , _port_2(port_2, true) - , _type(type) + : _str(NULL) + , _port_1(port_1, false) + , _port_2(port_2, true) + , _type(type) {} void execute(Patchage* patchage); |