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.cpp | |
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.cpp')
-rw-r--r-- | src/PatchageEvent.cpp | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/PatchageEvent.cpp b/src/PatchageEvent.cpp index b1489e3..78f0829 100644 --- a/src/PatchageEvent.cpp +++ b/src/PatchageEvent.cpp @@ -18,18 +18,18 @@ #include "patchage_config.h" +#include "Driver.hpp" #include "Patchage.hpp" #include "PatchageCanvas.hpp" #include "PatchageModule.hpp" -#include "Driver.hpp" #if defined(HAVE_JACK_DBUS) -# include "JackDbusDriver.hpp" +# include "JackDbusDriver.hpp" #elif defined(PATCHAGE_LIBJACK) -# include "JackDriver.hpp" +# include "JackDriver.hpp" #endif #ifdef HAVE_ALSA -# include "AlsaDriver.hpp" +# include "AlsaDriver.hpp" #endif #include <boost/format.hpp> @@ -69,12 +69,12 @@ PatchageEvent::execute(Patchage* patchage) PatchagePort* port = driver->create_port_view(patchage, _port_1); if (!port) { patchage->error_msg( - (format("Unable to create view for port `%1%'") - % _port_1).str()); + (format("Unable to create view for port `%1%'") % _port_1) + .str()); } } else { patchage->error_msg( - (format("Unknown type for port `%1%'") % _port_1).str()); + (format("Unknown type for port `%1%'") % _port_1).str()); } } else if (_type == PORT_DESTRUCTION) { @@ -87,11 +87,13 @@ PatchageEvent::execute(Patchage* patchage) PatchagePort* port_2 = patchage->canvas()->find_port(_port_2); if (!port_1) - patchage->error_msg((format("Unable to find port `%1%' to connect") - % _port_1).str()); + patchage->error_msg( + (format("Unable to find port `%1%' to connect") % _port_1) + .str()); else if (!port_2) - patchage->error_msg((format("Unable to find port `%1%' to connect") - % _port_2).str()); + patchage->error_msg( + (format("Unable to find port `%1%' to connect") % _port_2) + .str()); else patchage->canvas()->make_connection(port_1, port_2); @@ -101,11 +103,13 @@ PatchageEvent::execute(Patchage* patchage) PatchagePort* port_2 = patchage->canvas()->find_port(_port_2); if (!port_1) - patchage->error_msg((format("Unable to find port `%1%' to disconnect") - % _port_1).str()); + patchage->error_msg( + (format("Unable to find port `%1%' to disconnect") % _port_1) + .str()); else if (!port_2) - patchage->error_msg((format("Unable to find port `%1%' to disconnect") - % _port_2).str()); + patchage->error_msg( + (format("Unable to find port `%1%' to disconnect") % _port_2) + .str()); else patchage->canvas()->remove_edge_between(port_1, port_2); } |