Codechange: use std::sort() in GUIList

This commit is contained in:
glx
2019-04-11 21:26:02 +02:00
committed by PeterN
parent b9b34f676b
commit 2db88953e7
14 changed files with 189 additions and 188 deletions

View File

@@ -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;
}
/*