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/AlsaDriver.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/AlsaDriver.hpp')
-rw-r--r-- | src/AlsaDriver.hpp | 60 |
1 files changed, 27 insertions, 33 deletions
diff --git a/src/AlsaDriver.hpp b/src/AlsaDriver.hpp index e5bb8cf..7428db2 100644 --- a/src/AlsaDriver.hpp +++ b/src/AlsaDriver.hpp @@ -47,15 +47,11 @@ public: void refresh(); void destroy_all(); - PatchagePort* create_port_view( - Patchage* patchage, - const PortID& id); + PatchagePort* create_port_view(Patchage* patchage, const PortID& id); - bool connect(PatchagePort* src_port, - PatchagePort* dst_port); + bool connect(PatchagePort* src_port, PatchagePort* dst_port); - bool disconnect(PatchagePort* src_port, - PatchagePort* dst_port); + bool disconnect(PatchagePort* src_port, PatchagePort* dst_port); void print_addr(snd_seq_addr_t addr); @@ -68,25 +64,20 @@ private: PatchageModule* find_module(uint8_t client_id, ModuleType type); - PatchageModule* - find_or_create_module( - Patchage* patchage, - uint8_t client_id, - const std::string& client_name, - ModuleType type); - - void - create_port_view_internal( - Patchage* patchage, - snd_seq_addr_t addr, - PatchageModule*& parent, - PatchagePort*& port); - - PatchagePort* create_port( - PatchageModule& parent, - const std::string& name, - bool is_input, - snd_seq_addr_t addr); + PatchageModule* find_or_create_module(Patchage* patchage, + uint8_t client_id, + const std::string& client_name, + ModuleType type); + + void create_port_view_internal(Patchage* patchage, + snd_seq_addr_t addr, + PatchageModule*& parent, + PatchagePort*& port); + + PatchagePort* create_port(PatchageModule& parent, + const std::string& name, + bool is_input, + snd_seq_addr_t addr); Patchage* _app; snd_seq_t* _seq; @@ -95,22 +86,25 @@ private: Glib::Mutex _events_mutex; std::queue<PatchageEvent> _events; - struct SeqAddrComparator { - bool operator() (const snd_seq_addr_t& a, const snd_seq_addr_t& b) const { - return ((a.client < b.client) || ((a.client == b.client) && a.port < b.port)); + struct SeqAddrComparator + { + bool operator()(const snd_seq_addr_t& a, const snd_seq_addr_t& b) const + { + return ((a.client < b.client) || + ((a.client == b.client) && a.port < b.port)); } }; typedef std::set<snd_seq_addr_t, SeqAddrComparator> Ignored; - Ignored _ignored; + Ignored _ignored; typedef std::multimap<uint8_t, PatchageModule*> Modules; - Modules _modules; + Modules _modules; typedef std::map<PatchagePort*, PortID> PortAddrs; - PortAddrs _port_addrs; + PortAddrs _port_addrs; - bool ignore(const snd_seq_addr_t& addr, bool add=true); + bool ignore(const snd_seq_addr_t& addr, bool add = true); }; #endif // PATCHAGE_ALSADRIVER_HPP |