Codechange: Remove virtual functions SpriteGroup::GetResult and GetNumResults. They are only implemented in and called via ResultSpriteGroup.

This commit is contained in:
frosch
2025-04-28 16:27:00 +02:00
committed by frosch
parent 010b944173
commit 8027e31f47
9 changed files with 24 additions and 29 deletions

View File

@@ -276,11 +276,11 @@ PalSpriteID GetBadgeSprite(const Badge &badge, GrfSpecFeature feature, std::opti
{
BadgeResolverObject object(badge, feature, introduction_date);
const auto *group = object.Resolve<ResultSpriteGroup>();
if (group == nullptr || group->GetNumResults() == 0) return {0, PAL_NONE};
if (group == nullptr || group->num_sprites == 0) return {0, PAL_NONE};
PaletteID pal = badge.flags.Test(BadgeFlag::UseCompanyColour) ? remap : PAL_NONE;
return {group->GetResult(), pal};
return {group->sprite, pal};
}
/**