93edcaef20
Don't cast function pointers of incompatible types, this resulted in gcc 8 -Wcast-function-type warnings and could hide real errors. To fix this, overload wxBaseArray::Sort() to accept either the "legacy" sort function compatible with qsort() or a function compatible with std::sort(), as it seems both variants could be used before. Also make the type of the latter function customizable via a new optional Sorter template parameter in wxBaseArray in order to allow wxSortedArrayString to specify its own variant of it, taking (const) references instead of values. This complicates things, but should preserve compatibility while being type-safe and, also, allows to simplify _WX_DEFINE_SORTED_TYPEARRAY_2 by not passing the sort function signature to it any more. |
||
---|---|---|
.. | ||
msvc/wx | ||
wx |