From 49685c39895af67d7ffcc50fdc02150b6ee44f72 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Tue, 5 Apr 2022 22:01:53 -0400 Subject: fix up a bunch of clang-tidy stuff mostly changing references, which i hope doesnt break stuff with models (TreeRow, iterators) since they gave me some strange problems in the past --- src/components/draglistbox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/draglistbox.cpp') diff --git a/src/components/draglistbox.cpp b/src/components/draglistbox.cpp index 492abc3..50bb5b0 100644 --- a/src/components/draglistbox.cpp +++ b/src/components/draglistbox.cpp @@ -102,7 +102,7 @@ bool DragListBox::scroll() { } void DragListBox::on_drag_data_received(const Glib::RefPtr &context, int x, int y, const Gtk::SelectionData &selection_data, guint info, guint time) { - int index = 0; + int index; if (m_hover_row != nullptr) { if (m_top) { index = m_hover_row->get_index() - 1; @@ -130,7 +130,7 @@ void DragListBox::on_drag_data_received(const Glib::RefPtr &co void DragListBox::add_draggable(Gtk::ListBoxRow *widget) { widget->drag_source_set(m_entries, Gdk::BUTTON1_MASK, Gdk::ACTION_MOVE); widget->signal_drag_begin().connect(sigc::bind<0>(sigc::mem_fun(*this, &DragListBox::row_drag_begin), widget)); - widget->signal_drag_data_get().connect([this, widget](const Glib::RefPtr &context, Gtk::SelectionData &selection_data, guint info, guint time) { + widget->signal_drag_data_get().connect([widget](const Glib::RefPtr &context, Gtk::SelectionData &selection_data, guint info, guint time) { selection_data.set("GTK_LIST_BOX_ROW", 32, reinterpret_cast(&widget), sizeof(&widget)); }); add(*widget); -- cgit v1.2.3