From af5ec4bdda21e9a2f76f22050216a0b1cbbed575 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 9 Feb 2020 14:34:20 +0100 Subject: 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. --- src/PatchageEvent.cpp | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'src/PatchageEvent.cpp') 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 @@ -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); } -- cgit v1.2.1