From 2db88953e7e0e521b4514f356038eeb36b299dff Mon Sep 17 00:00:00 2001 From: glx Date: Thu, 11 Apr 2019 21:26:02 +0200 Subject: Codechange: use std::sort() in GUIList --- src/story_gui.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/story_gui.cpp') 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; } /* -- cgit v1.2.3-54-g00ecf