addon/mg: Use a multiset instead of a set to sort add-ons by title

This allows add-ons with identical titles to appear as many times as
necessary in the add-ons list instead of the first one clobbering the
rest.

Patch #3769 by thunderstruck. Fixes bug #20518.
This commit is contained in:
Ignacio R. Morelle 2013-03-05 09:21:51 +00:00
parent 3d67c4cd7e
commit 0d0b347340
3 changed files with 6 additions and 2 deletions

View file

@ -1,5 +1,6 @@
Version 1.11.1+svn:
* Add-ons client:
* Fixed bug #20518: identical add-ons titles not supported
* Add a button to the Filter Options dialog to toggle all currently
displayed add-on categories at once
* AI:

View file

@ -898,6 +898,9 @@
[entry]
name = "Andrea Palmatè (afxgroup)"
[/entry]
[entry]
name = "Andrius Šilinskas (thunderstruck)"
[/entry]
[entry]
name = "Andrius Štikonas"
[/entry]

View file

@ -447,14 +447,14 @@ struct addon_pointer_list_sorter
* list of _pointers_ to addon list items, sorted according to their titles.
*
* The pointers list is generated by the @a sort_addons_list function.
* It's internally an STL set using @a addon_pointer_list_sorter as its
* It's internally an STL multiset using @a addon_pointer_list_sorter as its
* comparison operator, in order to avoid reimplementing an entire sorting
* algorithm here.
*
* FIXME. This is obviously quite a hack, hopefully temporary until I
* figure out a better mechanism.
*/
typedef std::set<const addons_list::value_type*, addon_pointer_list_sorter>
typedef std::multiset<const addons_list::value_type*, addon_pointer_list_sorter>
sorted_addon_pointer_list;
sorted_addon_pointer_list sort_addons_list(addons_list& addons)