diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2017-07-29 01:48:01 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2017-07-29 01:48:01 +0200 |
| commit | 8d58ffb022649fd8a28d2f74845fc8ca5c934029 (patch) | |
| tree | 3ce6d5037e95192401a9490c9d13253101017764 /src/gui_gtk.cc | |
| parent | c974e4b5df40aec646a60c747f453d11a8e7587c (diff) | |
Remove attribute(__unused__) usage
Just omitting the parameter name is more portable and less to write
Diffstat (limited to 'src/gui_gtk.cc')
| -rw-r--r-- | src/gui_gtk.cc | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/src/gui_gtk.cc b/src/gui_gtk.cc index af67921..c134e5f 100644 --- a/src/gui_gtk.cc +++ b/src/gui_gtk.cc @@ -693,9 +693,7 @@ public: auto ptr = new std::string(data); gtk_clipboard_set_with_data( clipboard, target, 1, - [](GtkClipboard* UNUSED(clipboard), - GtkSelectionData* selection, - guint UNUSED(info), + [](GtkClipboard*, GtkSelectionData* selection, guint, gpointer user_data) -> void { auto data = reinterpret_cast<std::string*>(user_data); gtk_selection_data_set(selection, @@ -704,8 +702,7 @@ public: reinterpret_cast<guchar const*>(data->data()), data->size()); }, - [](GtkClipboard* UNUSED(clipboard), - gpointer user_data) -> void { + [](GtkClipboard*, gpointer user_data) -> void { auto data = reinterpret_cast<std::string*>(user_data); delete data; }, @@ -1379,7 +1376,7 @@ protected: } } - static void show_filechooser(GtkButton* UNUSED(button), gpointer user_data) { + static void show_filechooser(GtkButton*, gpointer user_data) { auto value = reinterpret_cast<FileValue*>(user_data); auto ret = gtk_native_dialog_run(GTK_NATIVE_DIALOG(value->chooser_)); if (ret == GTK_RESPONSE_ACCEPT) { @@ -1390,24 +1387,22 @@ protected: } } - static void changed(GtkEditable* UNUSED(editable), gpointer user_data) { + static void changed(GtkEditable*, gpointer user_data) { auto value = reinterpret_cast<Value*>(user_data); value->me_->notify_changed(value->id_); } - static void file_set(GtkFileChooserButton* UNUSED(widget), - gpointer user_data) { + static void file_set(GtkFileChooserButton*, gpointer user_data) { auto value = reinterpret_cast<Value*>(user_data); value->me_->notify_changed(value->id_); } - static void toggled(GtkToggleButton* UNUSED(button), gpointer user_data) { + static void toggled(GtkToggleButton*, gpointer user_data) { auto value = reinterpret_cast<Value*>(user_data); value->me_->notify_changed(value->id_); } - virtual gint add_extra_widgets(GtkGrid* UNUSED(grid), gint row, - gint UNUSED(colspan)) { + virtual gint add_extra_widgets(GtkGrid*, gint row, gint) { return row; } @@ -1628,7 +1623,7 @@ public: observers_.erase(listener); } - void show(GuiWindow* UNUSED(parent)) override { + void show(GuiWindow*) override { if (wnd_) { assert(false); focus(); @@ -1690,12 +1685,12 @@ protected: gtk_text_view_set_buffer(GTK_TEXT_VIEW(view_), buf); } - static void buf_changed(GtkTextBuffer* UNUSED(buffer), gpointer user_data) { + static void buf_changed(GtkTextBuffer*, gpointer user_data) { auto me = reinterpret_cast<GtkGuiTextWindow*>(user_data); me->scroll_to_bottom(); } - static gboolean delete_event(GtkWidget* widget, GdkEvent* UNUSED(event), + static gboolean delete_event(GtkWidget* widget, GdkEvent*, gpointer user_data) { auto me = reinterpret_cast<GtkGuiTextWindow*>(user_data); assert(me->wnd_ == widget); @@ -1819,11 +1814,11 @@ void main_app_activate(GApplication* g_app) { app->main_->sync_split(); } -void main_app_window_open(MainAppWindow* UNUSED(win), GFile* UNUSED(file)) { +void main_app_window_open(MainAppWindow*, GFile*) { } void main_app_open(GApplication* app, GFile** files, gint n_files, - gchar const* UNUSED(hint)) { + gchar const*) { auto windows = gtk_application_get_windows(GTK_APPLICATION(app)); auto win = windows ? MAIN_APP_WINDOW(windows->data) : main_app_window_new(MAIN_APP(app)); @@ -1837,7 +1832,7 @@ void main_app_open(GApplication* app, GFile** files, gint n_files, MAIN_APP(app)->main_->sync_split(); } -void main_app_init(MainApp* UNUSED(app)) { +void main_app_init(MainApp*) { } void main_app_class_init(MainAppClass* clazz) { @@ -1845,10 +1840,10 @@ void main_app_class_init(MainAppClass* clazz) { G_APPLICATION_CLASS(clazz)->open = main_app_open; } -void main_app_window_init(MainAppWindow* UNUSED(app)) { +void main_app_window_init(MainAppWindow*) { } -void main_app_window_class_init(MainAppWindowClass* UNUSED(clazz)) { +void main_app_window_class_init(MainAppWindowClass*) { } MainApp* main_app_new(GtkGuiMain* main) { @@ -1975,8 +1970,7 @@ std::string GtkGuiMenu::unescape(std::string const& action) { return action; } -void menu_item_activate(GSimpleAction* action, GVariant* UNUSED(parameter), - gpointer data) { +void menu_item_activate(GSimpleAction* action, GVariant*, gpointer data) { auto menu = reinterpret_cast<GtkGuiMenu*>(data); menu->activate(action); } |
