summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-28 21:26:27 +0100
committerDavid Robillard <d@drobilla.net>2020-11-28 22:49:10 +0100
commit0f25dd575f9c74cc34a54e64468f07e6c631750d (patch)
treebc02f544786caf4be87eb0f56ed090228b71e2fe
parent9875f53b170ddc358d2ad7c830bdcee7a406d401 (diff)
downloadpatchage-0f25dd575f9c74cc34a54e64468f07e6c631750d.tar.gz
patchage-0f25dd575f9c74cc34a54e64468f07e6c631750d.tar.bz2
patchage-0f25dd575f9c74cc34a54e64468f07e6c631750d.zip
Use anonymous namespaces instead of static
-rw-r--r--src/Patchage.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/Patchage.cpp b/src/Patchage.cpp
index 2b12133..7613935 100644
--- a/src/Patchage.cpp
+++ b/src/Patchage.cpp
@@ -68,13 +68,15 @@ PATCHAGE_RESTORE_WARNINGS
# include <gtkosxapplication.h>
-static gboolean
+namespace {
+
+gboolean
can_activate_cb(GtkWidget* widget, guint signal_id, gpointer data)
{
return gtk_widget_is_sensitive(widget);
}
-static void
+void
terminate_cb(GtkosxApplication* app, gpointer data)
{
Patchage* patchage = (Patchage*)data;
@@ -82,16 +84,20 @@ terminate_cb(GtkosxApplication* app, gpointer data)
Gtk::Main::quit();
}
+} // namespace
+
#endif
-static bool
+namespace {
+
+bool
configure_cb(GtkWindow*, GdkEvent*, gpointer data)
{
static_cast<Patchage*>(data)->store_window_location();
return FALSE;
}
-static int
+int
port_order(const GanvPort* a, const GanvPort* b, void*)
{
const auto* pa = dynamic_cast<const PatchagePort*>(Glib::wrap(a));
@@ -114,6 +120,8 @@ port_order(const GanvPort* a, const GanvPort* b, void*)
return 0;
}
+} // namespace
+
#define INIT_WIDGET(x) x(_xml, (#x) + 1)
Patchage::Patchage(int argc, char** argv)