Codechange: Use FlatSet when filtering and drawing badge names.

This commit is contained in:
Peter Nelson
2025-04-13 10:06:35 +01:00
committed by Peter Nelson
parent 5fd7344a6d
commit 7679b0bc46
3 changed files with 5 additions and 6 deletions
+2 -1
View File
@@ -9,6 +9,7 @@
#include "stdafx.h"
#include "core/flatset_type.hpp"
#include "dropdown_type.h"
#include "newgrf.h"
#include "newgrf_badge.h"
@@ -120,7 +121,7 @@ int DrawBadgeNameList(Rect r, std::span<const BadgeID> badges, GrfSpecFeature)
{
if (badges.empty()) return r.top;
std::set<BadgeClassID> class_indexes;
FlatSet<BadgeClassID> class_indexes;
for (const BadgeID &index : badges) class_indexes.insert(GetBadge(index)->class_index);
std::string_view list_separator = GetListSeparator();