From 22b243757274350882facfe69e74b1301bf18266 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Thu, 24 Aug 2017 06:52:19 +1100 Subject: [PATCH] GUI2/Listbox: used std::less instead of custom comparison function --- src/gui/widgets/listbox.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp index 160c0ab54735..1aefa6473daa 100644 --- a/src/gui/widgets/listbox.cpp +++ b/src/gui/widgets/listbox.cpp @@ -563,12 +563,6 @@ void listbox::finalize(builder_grid_const_ptr header, -1, list_builder_, list_data, callback_list_item_clicked); swap_grid(nullptr, content_grid(), generator_, "_list_grid"); } -namespace { - bool default_sort(unsigned i1, unsigned i2) - { - return i1 < i2; - } -} void listbox::order_by_column(unsigned column, widget& widget) { @@ -586,7 +580,7 @@ void listbox::order_by_column(unsigned column, widget& widget) return; } if(selectable.get_value() == SORT_NONE) { - order_by(generator_base::torder_func(&default_sort)); + order_by(std::less()); } else { order_by(orders_[column].second[selectable.get_value() - 1]);