[General] Use stable sorting algorithm
This commit is contained in:
parent
ef4a2492af
commit
b33d7fe508
@ -13,7 +13,7 @@ namespace Components
|
||||
|
||||
void Friends::SortIndividualList(std::vector<Friends::Friend>* list)
|
||||
{
|
||||
std::sort(list->begin(), list->end(), [](Friends::Friend const& friend1, Friends::Friend const& friend2)
|
||||
std::stable_sort(list->begin(), list->end(), [](Friends::Friend const& friend1, Friends::Friend const& friend2)
|
||||
{
|
||||
return friend1.cleanName.compare(friend2.cleanName) < 0;
|
||||
});
|
||||
|
@ -558,7 +558,7 @@ namespace Components
|
||||
Game::menuDef_t* menu = Game::Menus_FindByName(Game::uiContext, "pc_join_unranked");
|
||||
if (!menu || !Game::Menu_IsVisible(Game::uiContext, menu)) return;
|
||||
|
||||
std::sort(ServerList::VisibleList.begin(), ServerList::VisibleList.end(), [](const unsigned int &server1, const unsigned int &server2) -> bool
|
||||
std::stable_sort(ServerList::VisibleList.begin(), ServerList::VisibleList.end(), [](const unsigned int &server1, const unsigned int &server2) -> bool
|
||||
{
|
||||
ServerInfo* info1 = nullptr;
|
||||
ServerInfo* info2 = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user