diff options
author | glx <glx@openttd.org> | 2019-04-11 21:26:02 +0200 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-04-13 12:49:18 +0100 |
commit | 2db88953e7e0e521b4514f356038eeb36b299dff (patch) | |
tree | 0f058052645065811ffa58deaee2e592583587b5 /src/story_gui.cpp | |
parent | b9b34f676b96e29ec91711bd7ff74d2492424655 (diff) | |
download | openttd-2db88953e7e0e521b4514f356038eeb36b299dff.tar.xz |
Codechange: use std::sort() in GUIList
Diffstat (limited to 'src/story_gui.cpp')
-rw-r--r-- | src/story_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/story_gui.cpp b/src/story_gui.cpp index 944e7bd50..5ce77cc63 100644 --- a/src/story_gui.cpp +++ b/src/story_gui.cpp @@ -69,9 +69,9 @@ protected: } /** Sort story pages by order value. */ - static int CDECL PageOrderSorter(const StoryPage * const *a, const StoryPage * const *b) + static bool PageOrderSorter(const StoryPage * const &a, const StoryPage * const &b) { - return (*a)->sort_value - (*b)->sort_value; + return a->sort_value < b->sort_value; } /** (Re)Build story page element list. */ @@ -98,9 +98,9 @@ protected: } /** Sort story page elements by order value. */ - static int CDECL PageElementOrderSorter(const StoryPageElement * const *a, const StoryPageElement * const *b) + static bool PageElementOrderSorter(const StoryPageElement * const &a, const StoryPageElement * const &b) { - return (*a)->sort_value - (*b)->sort_value; + return a->sort_value < b->sort_value; } /* |