summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/AlsaDriver.cpp15
-rw-r--r--src/AlsaDriver.hpp12
-rw-r--r--src/Configuration.cpp11
-rw-r--r--src/Configuration.hpp1
-rw-r--r--src/Driver.hpp4
-rw-r--r--src/JackDbusDriver.cpp24
-rw-r--r--src/JackDriver.cpp21
-rw-r--r--src/JackDriver.hpp9
-rw-r--r--src/Legend.hpp6
-rw-r--r--src/Patchage.cpp46
-rw-r--r--src/Patchage.hpp12
-rw-r--r--src/PatchageCanvas.cpp17
-rw-r--r--src/PatchageCanvas.hpp19
-rw-r--r--src/PatchageEvent.cpp7
-rw-r--r--src/PatchageEvent.hpp12
-rw-r--r--src/PatchageModule.cpp3
-rw-r--r--src/PatchageModule.hpp8
-rw-r--r--src/PatchagePort.hpp17
-rw-r--r--src/PortID.hpp8
-rw-r--r--src/UIFile.hpp15
-rw-r--r--src/Widget.hpp4
-rw-r--r--src/binary_location.h6
-rw-r--r--src/main.cpp15
23 files changed, 151 insertions, 141 deletions
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 <http://www.gnu.org/licenses/>.
*/
-#include <cassert>
-#include <set>
-#include <string>
-#include <utility>
-
-#include <boost/format.hpp>
-
#include "AlsaDriver.hpp"
+
#include "Patchage.hpp"
#include "PatchageCanvas.hpp"
#include "PatchageModule.hpp"
#include "PatchagePort.hpp"
+#include <boost/format.hpp>
+
+#include <cassert>
+#include <set>
+#include <string>
+#include <utility>
+
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 <queue>
-#include <set>
-#include <string>
-#include <map>
+#include "Driver.hpp"
+#include "PatchageModule.hpp"
#include <alsa/asoundlib.h>
#include <pthread.h>
-#include "Driver.hpp"
-#include "PatchageModule.hpp"
+#include <map>
+#include <queue>
+#include <set>
+#include <string>
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 <http://www.gnu.org/licenses/>.
*/
-#include <ctype.h>
-#include <stdlib.h>
+#include "Configuration.hpp"
+
+#include "Patchage.hpp"
+#include <cctype>
+#include <cstdlib>
#include <fstream>
#include <ios>
#include <iostream>
#include <limits>
-#include <stdexcept>
#include <vector>
-#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 <stdint.h>
#include <string>
-#include <list>
#include <map>
#include <boost/optional.hpp>
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 <sigc++/sigc++.h>
-
#include "PatchageEvent.hpp"
+#include <sigc++/sigc++.h>
+
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 <http://www.gnu.org/licenses/>.
*/
-#include <cassert>
-#include <cstring>
-#include <string>
-#include <set>
+#include "JackDbusDriver.hpp"
#include "patchage_config.h"
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
-
-#include <boost/format.hpp>
-
#include "Driver.hpp"
-#include "JackDbusDriver.hpp"
#include "Patchage.hpp"
#include "PatchageCanvas.hpp"
#include "PatchageEvent.hpp"
#include "PatchageModule.hpp"
+#include <boost/format.hpp>
+#include <dbus/dbus-glib-lowlevel.h>
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus.h>
+#include <glib.h>
+
+#include <cassert>
+#include <cstring>
+#include <string>
+#include <set>
+
#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 <http://www.gnu.org/licenses/>.
*/
-#include <cassert>
-#include <cstring>
-#include <set>
-#include <string>
-
-#include <boost/format.hpp>
-
-#include <jack/jack.h>
-#include <jack/statistics.h>
-
#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 <jack/metadata.h>
#include "jackey.h"
#endif
+#include <boost/format.hpp>
+#include <jack/jack.h>
+#include <jack/statistics.h>
+
+#include <cassert>
+#include <cstring>
+#include <set>
+#include <string>
+
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 <string>
-
-#include <jack/jack.h>
+#include "Driver.hpp"
+#include "Queue.hpp"
#include <glibmm/thread.h>
+#include <jack/jack.h>
-#include "Driver.hpp"
-#include "Queue.hpp"
+#include <string>
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 <gtkmm/colorbutton.h>
-#include <gtkmm/box.h>
-
#include "Configuration.hpp"
+#include <gtkmm/box.h>
+#include <gtkmm/colorbutton.h>
+
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 <http://www.gnu.org/licenses/>.
*/
-#include <stdlib.h>
-#include <pthread.h>
-
-#include <cmath>
-#include <fstream>
-
-#include <glib.h>
-#include <glib/gstdio.h>
-#include <gtk/gtkwindow.h>
-
-#include <boost/format.hpp>
-
-#include <gtkmm/button.h>
-#include <gtkmm/filechooserdialog.h>
-#include <gtkmm/liststore.h>
-#include <gtkmm/menuitem.h>
-#include <gtkmm/messagedialog.h>
-#include <gtkmm/stock.h>
-#include <gtkmm/treemodel.h>
-
-#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 <boost/format.hpp>
+#include <glib.h>
+#include <glib/gstdio.h>
+#include <gtk/gtkwindow.h>
+#include <gtkmm/button.h>
+#include <gtkmm/filechooserdialog.h>
+#include <gtkmm/liststore.h>
+#include <gtkmm/menuitem.h>
+#include <gtkmm/messagedialog.h>
+#include <gtkmm/stock.h>
+#include <gtkmm/treemodel.h>
+
+#include <cstdlib>
+#include <cmath>
+#include <fstream>
+
#ifdef PATCHAGE_GTK_OSX
- #include <gtkosxapplication.h>
+
+#include <gtkosxapplication.h>
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 <set>
-#include <string>
-#include <memory>
-
#include <gtkmm/aboutdialog.h>
#include <gtkmm/alignment.h>
#include <gtkmm/builder.h>
@@ -42,9 +38,13 @@
#include <gtkmm/viewport.h>
#include <gtkmm/window.h>
-#include "patchage_config.h"
-#include "Widget.hpp"
#include "Legend.hpp"
+#include "Widget.hpp"
+#include "patchage_config.h"
+
+#include <memory>
+#include <set>
+#include <string>
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 <http://www.gnu.org/licenses/>.
*/
-#include <boost/format.hpp>
+#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 <boost/format.hpp>
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 <map>
-#include <string>
-
#include "patchage_config.h"
-#ifdef HAVE_ALSA
- #include <alsa/asoundlib.h>
-#endif
-
-#include "ganv/Canvas.hpp"
-
#include "PatchageEvent.hpp"
#include "PatchageModule.hpp"
#include "PortID.hpp"
+#include "ganv/Canvas.hpp"
+
+#ifdef HAVE_ALSA
+ #include <alsa/asoundlib.h>
+#endif
+
+#include <map>
+#include <string>
+#include <utility>
+
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 <http://www.gnu.org/licenses/>.
*/
-#include <boost/format.hpp>
+#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 <boost/format.hpp>
+
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 <cstring>
-
#include "patchage_config.h"
+#include "PatchagePort.hpp"
+#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 "PatchagePort.hpp"
-#include "PortID.hpp"
+#include <cstring>
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 <http://www.gnu.org/licenses/>.
*/
+#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 <string>
-
-#include <gtkmm/menu_elems.h>
+#include "Configuration.hpp"
#include "ganv/Module.hpp"
#include "ganv/Port.hpp"
-#include "Configuration.hpp"
+#include <gtkmm/menu_elems.h>
+
+#include <string>
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 <string>
-
-#include <gtkmm/menu.h>
-#include <gtkmm/menushell.h>
-
-#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 <gtkmm/menu.h>
+#include <gtkmm/menushell.h>
+
+#include <string>
/** 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 <cstring>
-#include <iostream>
-
#include "patchage_config.h"
+#include "PatchagePort.hpp"
+
#ifdef PATCHAGE_LIBJACK
#include <jack/jack.h>
#endif
@@ -29,7 +28,8 @@
#include <alsa/asoundlib.h>
#endif
-#include "PatchagePort.hpp"
+#include <cstring>
+#include <iostream>
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 <gtkmm/builder.h>
+
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
-#include <gtkmm/builder.h>
-
-#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 <string>
-
#include <gtkmm/builder.h>
+#include <string>
+
template <typename W>
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 <assert.h>
-#include <limits.h>
-#include <stdlib.h>
#include <dlfcn.h>
+#include <cassert>
+#include <climits>
+#include <cstdlib>
#include <string>
/** 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 <stdlib.h>
+
+#include "binary_location.h"
+
+#include <gtk/gtkrc.h>
+
#include <unistd.h>
+
+#include <cstdlib>
#include <string>
-#include <gtk/gtkrc.h>
-#include "binary_location.h"
+
#endif
-#include <iostream>
+#include "Patchage.hpp"
#include <glibmm/exception.h>
-#include "Patchage.hpp"
+#include <iostream>
#ifdef __APPLE__
void