From 762cfaa66a7be2fe61722d1d2a1679af65bd1f9a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 29 Dec 2019 20:02:36 -0500 Subject: Clean up includes --- src/AlsaDriver.cpp | 15 ++++++++------- src/AlsaDriver.hpp | 12 ++++++------ src/Configuration.cpp | 11 +++++------ src/Configuration.hpp | 1 - src/Driver.hpp | 4 ++-- src/JackDbusDriver.cpp | 24 ++++++++++++------------ src/JackDriver.cpp | 21 +++++++++++---------- src/JackDriver.hpp | 9 ++++----- src/Legend.hpp | 6 +++--- src/Patchage.cpp | 46 ++++++++++++++++++++++------------------------ src/Patchage.hpp | 12 ++++++------ src/PatchageCanvas.cpp | 17 +++++++++-------- src/PatchageCanvas.hpp | 19 ++++++++++--------- src/PatchageEvent.cpp | 7 +++++-- src/PatchageEvent.hpp | 12 ++++++------ src/PatchageModule.cpp | 3 ++- src/PatchageModule.hpp | 8 ++++---- src/PatchagePort.hpp | 17 +++++++++-------- src/PortID.hpp | 8 ++++---- src/UIFile.hpp | 15 ++++++++------- src/Widget.hpp | 4 ++-- src/binary_location.h | 6 +++--- src/main.cpp | 15 ++++++++++----- 23 files changed, 151 insertions(+), 141 deletions(-) (limited to 'src') diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp index 1ebd12d..1997e94 100644 --- a/src/AlsaDriver.cpp +++ b/src/AlsaDriver.cpp @@ -14,19 +14,20 @@ * along with Patchage. If not, see . */ -#include -#include -#include -#include - -#include - #include "AlsaDriver.hpp" + #include "Patchage.hpp" #include "PatchageCanvas.hpp" #include "PatchageModule.hpp" #include "PatchagePort.hpp" +#include + +#include +#include +#include +#include + using std::endl; using std::string; using boost::format; diff --git a/src/AlsaDriver.hpp b/src/AlsaDriver.hpp index 8bf837a..e5bb8cf 100644 --- a/src/AlsaDriver.hpp +++ b/src/AlsaDriver.hpp @@ -17,16 +17,16 @@ #ifndef PATCHAGE_ALSADRIVER_HPP #define PATCHAGE_ALSADRIVER_HPP -#include -#include -#include -#include +#include "Driver.hpp" +#include "PatchageModule.hpp" #include #include -#include "Driver.hpp" -#include "PatchageModule.hpp" +#include +#include +#include +#include class Patchage; class PatchagePort; diff --git a/src/Configuration.cpp b/src/Configuration.cpp index d9537c0..219d4f9 100644 --- a/src/Configuration.cpp +++ b/src/Configuration.cpp @@ -14,19 +14,18 @@ * along with Patchage. If not, see . */ -#include -#include +#include "Configuration.hpp" + +#include "Patchage.hpp" +#include +#include #include #include #include #include -#include #include -#include "Configuration.hpp" -#include "Patchage.hpp" - static const char* port_type_names[N_PORT_TYPES] = { "JACK_AUDIO", "JACK_MIDI", diff --git a/src/Configuration.hpp b/src/Configuration.hpp index 127a4a8..64b72cf 100644 --- a/src/Configuration.hpp +++ b/src/Configuration.hpp @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/src/Driver.hpp b/src/Driver.hpp index 5c175a1..bab570b 100644 --- a/src/Driver.hpp +++ b/src/Driver.hpp @@ -17,10 +17,10 @@ #ifndef PATCHAGE_DRIVER_HPP #define PATCHAGE_DRIVER_HPP -#include - #include "PatchageEvent.hpp" +#include + class PatchagePort; class PatchageCanvas; diff --git a/src/JackDbusDriver.cpp b/src/JackDbusDriver.cpp index 7953051..f09bf85 100644 --- a/src/JackDbusDriver.cpp +++ b/src/JackDbusDriver.cpp @@ -14,27 +14,27 @@ * along with Patchage. If not, see . */ -#include -#include -#include -#include +#include "JackDbusDriver.hpp" #include "patchage_config.h" -#include -#include -#include -#include - -#include - #include "Driver.hpp" -#include "JackDbusDriver.hpp" #include "Patchage.hpp" #include "PatchageCanvas.hpp" #include "PatchageEvent.hpp" #include "PatchageModule.hpp" +#include +#include +#include +#include +#include + +#include +#include +#include +#include + #define JACKDBUS_SERVICE "org.jackaudio.service" #define JACKDBUS_OBJECT "/org/jackaudio/Controller" #define JACKDBUS_IFACE_CONTROL "org.jackaudio.JackControl" diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp index 5daedae..9455a2a 100644 --- a/src/JackDriver.cpp +++ b/src/JackDriver.cpp @@ -14,28 +14,29 @@ * along with Patchage. If not, see . */ -#include -#include -#include -#include - -#include - -#include -#include - #include "JackDriver.hpp" + #include "Patchage.hpp" #include "PatchageCanvas.hpp" #include "PatchageEvent.hpp" #include "PatchageModule.hpp" #include "Queue.hpp" #include "patchage_config.h" + #ifdef HAVE_JACK_METADATA #include #include "jackey.h" #endif +#include +#include +#include + +#include +#include +#include +#include + using std::endl; using std::string; using boost::format; diff --git a/src/JackDriver.hpp b/src/JackDriver.hpp index 875bd61..575c537 100644 --- a/src/JackDriver.hpp +++ b/src/JackDriver.hpp @@ -17,14 +17,13 @@ #ifndef PATCHAGE_JACKDRIVER_HPP #define PATCHAGE_JACKDRIVER_HPP -#include - -#include +#include "Driver.hpp" +#include "Queue.hpp" #include +#include -#include "Driver.hpp" -#include "Queue.hpp" +#include class Patchage; class PatchageEvent; diff --git a/src/Legend.hpp b/src/Legend.hpp index b95d30c..52a4851 100644 --- a/src/Legend.hpp +++ b/src/Legend.hpp @@ -17,11 +17,11 @@ #ifndef PATCHAGE_LEGEND_HPP #define PATCHAGE_LEGEND_HPP -#include -#include - #include "Configuration.hpp" +#include +#include + class Legend : public Gtk::HBox { public: Legend(const Configuration& configuration) { diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 7875bb9..eec9ac4 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -14,32 +14,10 @@ * along with Patchage. If not, see . */ -#include -#include - -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "ganv/Module.hpp" -#include "ganv/Edge.hpp" +#include "Patchage.hpp" #include "Configuration.hpp" #include "Legend.hpp" -#include "Patchage.hpp" #include "PatchageCanvas.hpp" #include "PatchageEvent.hpp" #include "UIFile.hpp" @@ -60,8 +38,28 @@ #include "AlsaDriver.hpp" #endif +#include "ganv/Module.hpp" +#include "ganv/Edge.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + #ifdef PATCHAGE_GTK_OSX - #include + +#include static gboolean can_activate_cb(GtkWidget* widget, guint signal_id, gpointer data) diff --git a/src/Patchage.hpp b/src/Patchage.hpp index 74826a0..9660d70 100644 --- a/src/Patchage.hpp +++ b/src/Patchage.hpp @@ -17,10 +17,6 @@ #ifndef PATCHAGE_PATCHAGE_HPP #define PATCHAGE_PATCHAGE_HPP -#include -#include -#include - #include #include #include @@ -42,9 +38,13 @@ #include #include -#include "patchage_config.h" -#include "Widget.hpp" #include "Legend.hpp" +#include "Widget.hpp" +#include "patchage_config.h" + +#include +#include +#include class AlsaDriver; class JackDriver; diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp index 4d63a4b..4b8d309 100644 --- a/src/PatchageCanvas.cpp +++ b/src/PatchageCanvas.cpp @@ -14,25 +14,26 @@ * along with Patchage. If not, see . */ -#include +#include "PatchageCanvas.hpp" #include "patchage_config.h" +#include "Patchage.hpp" +#include "PatchageModule.hpp" +#include "PatchagePort.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 "ganv/Edge.hpp" -#include "Patchage.hpp" -#include "PatchageCanvas.hpp" -#include "PatchageModule.hpp" -#include "PatchagePort.hpp" +#include using std::string; using boost::format; diff --git a/src/PatchageCanvas.hpp b/src/PatchageCanvas.hpp index 4b5fac1..ffe43ac 100644 --- a/src/PatchageCanvas.hpp +++ b/src/PatchageCanvas.hpp @@ -17,21 +17,22 @@ #ifndef PATCHAGE_PATCHAGECANVAS_HPP #define PATCHAGE_PATCHAGECANVAS_HPP -#include -#include - #include "patchage_config.h" -#ifdef HAVE_ALSA - #include -#endif - -#include "ganv/Canvas.hpp" - #include "PatchageEvent.hpp" #include "PatchageModule.hpp" #include "PortID.hpp" +#include "ganv/Canvas.hpp" + +#ifdef HAVE_ALSA + #include +#endif + +#include +#include +#include + class Patchage; class PatchageModule; class PatchagePort; diff --git a/src/PatchageEvent.cpp b/src/PatchageEvent.cpp index ea9a758..926a939 100644 --- a/src/PatchageEvent.cpp +++ b/src/PatchageEvent.cpp @@ -14,14 +14,15 @@ * along with Patchage. If not, see . */ -#include +#include "PatchageEvent.hpp" #include "patchage_config.h" + #include "Patchage.hpp" #include "PatchageCanvas.hpp" #include "PatchageModule.hpp" -#include "PatchageEvent.hpp" #include "Driver.hpp" + #if defined(HAVE_JACK_DBUS) # include "JackDbusDriver.hpp" #elif defined(PATCHAGE_LIBJACK) @@ -31,6 +32,8 @@ # include "AlsaDriver.hpp" #endif +#include + using std::endl; using boost::format; diff --git a/src/PatchageEvent.hpp b/src/PatchageEvent.hpp index 899f77f..4fe0bf3 100644 --- a/src/PatchageEvent.hpp +++ b/src/PatchageEvent.hpp @@ -17,19 +17,19 @@ #ifndef PATCHAGE_PATCHAGEEVENT_HPP #define PATCHAGE_PATCHAGEEVENT_HPP -#include - #include "patchage_config.h" +#include "PatchagePort.hpp" +#include "PortID.hpp" + #ifdef PATCHAGE_LIBJACK - #include + #include #endif #ifdef HAVE_ALSA - #include + #include #endif -#include "PatchagePort.hpp" -#include "PortID.hpp" +#include class Patchage; diff --git a/src/PatchageModule.cpp b/src/PatchageModule.cpp index 8ba5296..5f3c8c0 100644 --- a/src/PatchageModule.cpp +++ b/src/PatchageModule.cpp @@ -14,9 +14,10 @@ * along with Patchage. If not, see . */ +#include "PatchageModule.hpp" + #include "Patchage.hpp" #include "PatchageCanvas.hpp" -#include "PatchageModule.hpp" #include "PatchagePort.hpp" PatchageModule::PatchageModule( diff --git a/src/PatchageModule.hpp b/src/PatchageModule.hpp index 99527ac..526e739 100644 --- a/src/PatchageModule.hpp +++ b/src/PatchageModule.hpp @@ -17,14 +17,14 @@ #ifndef PATCHAGE_PATCHAGEMODULE_HPP #define PATCHAGE_PATCHAGEMODULE_HPP -#include - -#include +#include "Configuration.hpp" #include "ganv/Module.hpp" #include "ganv/Port.hpp" -#include "Configuration.hpp" +#include + +#include class Patchage; class PatchagePort; diff --git a/src/PatchagePort.hpp b/src/PatchagePort.hpp index f4921c8..14e7516 100644 --- a/src/PatchagePort.hpp +++ b/src/PatchagePort.hpp @@ -17,19 +17,20 @@ #ifndef PATCHAGE_PATCHAGEPORT_HPP #define PATCHAGE_PATCHAGEPORT_HPP -#include - -#include -#include - -#include "ganv/Port.hpp" -#include "ganv/Module.hpp" +#include "patchage_config.h" #include "Configuration.hpp" #include "PatchageCanvas.hpp" #include "PatchageModule.hpp" #include "PortID.hpp" -#include "patchage_config.h" + +#include "ganv/Port.hpp" +#include "ganv/Module.hpp" + +#include +#include + +#include /** A Port on a PatchageModule */ diff --git a/src/PortID.hpp b/src/PortID.hpp index 3f916c0..f8e530f 100644 --- a/src/PortID.hpp +++ b/src/PortID.hpp @@ -17,11 +17,10 @@ #ifndef PATCHAGE_PORTID_HPP #define PATCHAGE_PORTID_HPP -#include -#include - #include "patchage_config.h" +#include "PatchagePort.hpp" + #ifdef PATCHAGE_LIBJACK #include #endif @@ -29,7 +28,8 @@ #include #endif -#include "PatchagePort.hpp" +#include +#include struct PortID { PortID() : type(NULL_PORT_ID) { memset(&id, 0, sizeof(id)); } diff --git a/src/UIFile.hpp b/src/UIFile.hpp index f1ab5f8..343b1a6 100644 --- a/src/UIFile.hpp +++ b/src/UIFile.hpp @@ -17,18 +17,19 @@ #ifndef PATCHAGE_GLADEFILE_HPP #define PATCHAGE_GLADEFILE_HPP +#include "patchage_config.h" + +#ifdef PATCHAGE_BINLOC +# include "binary_location.h" +#endif + +#include + #include #include #include #include -#include - -#include "patchage_config.h" -#ifdef PATCHAGE_BINLOC -#include "binary_location.h" -#endif - class UIFile { public: inline static bool is_readable(const std::string& filename) { diff --git a/src/Widget.hpp b/src/Widget.hpp index f1c935f..6089d41 100644 --- a/src/Widget.hpp +++ b/src/Widget.hpp @@ -17,10 +17,10 @@ #ifndef PATCHAGE_WIDGET_HPP #define PATCHAGE_WIDGET_HPP -#include - #include +#include + template class Widget { public: diff --git a/src/binary_location.h b/src/binary_location.h index 303a3bd..25e49bf 100644 --- a/src/binary_location.h +++ b/src/binary_location.h @@ -18,11 +18,11 @@ #define _GNU_SOURCE #endif -#include -#include -#include #include +#include +#include +#include #include /** Return the absolute path of the binary. */ diff --git a/src/main.cpp b/src/main.cpp index 4822d3d..80d400d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,18 +15,23 @@ */ #ifdef __APPLE__ -#include + +#include "binary_location.h" + +#include + #include + +#include #include -#include -#include "binary_location.h" + #endif -#include +#include "Patchage.hpp" #include -#include "Patchage.hpp" +#include #ifdef __APPLE__ void -- cgit v1.2.1