Skip to content

Commit

Permalink
GUI2: drop t-prefix from order_func typedef
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Aug 25, 2017
1 parent 6b73ba5 commit e0bf0e4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/gui/widgets/generator.hpp
Expand Up @@ -248,8 +248,8 @@ class generator_base : public widget
data,
const std::function<void(widget&)>& callback) = 0;

typedef std::function<bool (unsigned, unsigned)> torder_func;
virtual void set_order(const torder_func& order) = 0;
typedef std::function<bool (unsigned, unsigned)> order_func;
virtual void set_order(const order_func& order) = 0;

/***** ***** ***** ***** Inherited ***** ***** ***** *****/

Expand Down Expand Up @@ -381,6 +381,6 @@ class generator_base : public widget

};

using generator_sort_array = std::array<generator_base::torder_func, 2>;
using generator_sort_array = std::array<generator_base::order_func, 2>;

} // namespace gui2
10 changes: 5 additions & 5 deletions src/gui/widgets/generator_private.hpp
Expand Up @@ -996,11 +996,11 @@ class generator : public minimum_selection,
/** whether need to recalculate order_dirty_ */
mutable bool order_dirty_;

typedef std::function<bool (unsigned, unsigned)> torder_func;
torder_func order_func_;
typedef std::function<bool (unsigned, unsigned)> order_func;
order_func order_func_;


virtual void set_order(const torder_func& order) override
virtual void set_order(const order_func& order) override
{
order_func_ = order;
order_dirty_ = true;
Expand All @@ -1009,10 +1009,10 @@ class generator : public minimum_selection,

struct calculate_order_helper
{
const torder_func& order_func_;
const order_func& order_func_;
const child_list& items_;

calculate_order_helper(const torder_func& order_func, const child_list& items)
calculate_order_helper(const order_func& order_func, const child_list& items)
: order_func_(order_func)
, items_(items)
{
Expand Down
2 changes: 1 addition & 1 deletion src/gui/widgets/listbox.cpp
Expand Up @@ -587,7 +587,7 @@ void listbox::order_by_column(unsigned column, widget& widget)
}
}

void listbox::order_by(const generator_base::torder_func& func)
void listbox::order_by(const generator_base::order_func& func)
{
generator_->set_order(func);

Expand Down
2 changes: 1 addition & 1 deletion src/gui/widgets/listbox.hpp
Expand Up @@ -262,7 +262,7 @@ class listbox : public scrollbar_container
list_builder_ = list_builder;
}

void order_by(const generator_base::torder_func& func);
void order_by(const generator_base::order_func& func);

void set_column_order(unsigned col, const generator_sort_array& func);

Expand Down

0 comments on commit e0bf0e4

Please sign in to comment.