From 0f25dd575f9c74cc34a54e64468f07e6c631750d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 28 Nov 2020 21:26:27 +0100 Subject: Use anonymous namespaces instead of static --- src/Patchage.cpp | 16 ++++++++++++---- 1 file 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 -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(data)->store_window_location(); return FALSE; } -static int +int port_order(const GanvPort* a, const GanvPort* b, void*) { const auto* pa = dynamic_cast(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) -- cgit v1.2.1