summaryrefslogtreecommitdiff
path: root/src/sortlist_type.h
diff options
context:
space:
mode:
authorJonathan G Rennison <j.g.rennison@gmail.com>2020-06-15 18:53:13 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2020-06-18 12:38:43 +0200
commit084b073e57817199fc679179d8b0e4520b10e606 (patch)
treec1db0594b8a694fdcfa1f99d3266068988c85844 /src/sortlist_type.h
parentd8182b7e1533027d43da6508652ecfc1b056548f (diff)
downloadopenttd-084b073e57817199fc679179d8b0e4520b10e606.tar.xz
Codechange: Use template type for GUIList::Sort comparator
Diffstat (limited to 'src/sortlist_type.h')
-rw-r--r--src/sortlist_type.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sortlist_type.h b/src/sortlist_type.h
index a8730d96d..e5bfe06a9 100644
--- a/src/sortlist_type.h
+++ b/src/sortlist_type.h
@@ -250,7 +250,8 @@ public:
* @return true if the list sequence has been altered
*
*/
- bool Sort(SortFunction *compare)
+ template <typename Comp>
+ bool Sort(Comp compare)
{
/* Do not sort if the resort bit is not set */
if (!(this->flags & VL_RESORT)) return false;