diff options
author | glx <glx@openttd.org> | 2019-04-11 22:17:30 +0200 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-04-13 12:49:18 +0100 |
commit | b52561fd381e2c8230730e852406b85210993a98 (patch) | |
tree | 8419fbfe87c06c7427eccbaee0384e96a85bb909 /src/autoreplace_gui.cpp | |
parent | 2db88953e7e0e521b4514f356038eeb36b299dff (diff) | |
download | openttd-b52561fd381e2c8230730e852406b85210993a98.tar.xz |
Codechange: use std::sort() in EngList_Sort[Partial]()
Diffstat (limited to 'src/autoreplace_gui.cpp')
-rw-r--r-- | src/autoreplace_gui.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index 40f8d8ef2..c00d97b91 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -32,11 +32,9 @@ void DrawEngineList(VehicleType type, int x, int r, int y, const GUIEngineList *eng_list, uint16 min, uint16 max, EngineID selected_id, bool show_count, GroupID selected_group); -static int CDECL EngineNumberSorter(const EngineID *a, const EngineID *b) +static bool EngineNumberSorter(const EngineID &a, const EngineID &b) { - int r = Engine::Get(*a)->list_position - Engine::Get(*b)->list_position; - - return r; + return Engine::Get(a)->list_position < Engine::Get(b)->list_position; } /** |