1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 11:42:54 +08:00

Reduce allocations in DrawableFlag tooltip

This commit is contained in:
Andrei Zavatski 2024-03-09 13:58:05 +03:00
parent 9b30fc484a
commit dd36942508

View File

@ -15,11 +15,14 @@ namespace osu.Game.Users.Drawables
{
private readonly CountryCode countryCode;
public LocalisableString TooltipText => countryCode == CountryCode.Unknown ? string.Empty : countryCode.GetDescription();
public LocalisableString TooltipText => countryCode == CountryCode.Unknown ? string.Empty : description;
private readonly string description;
public DrawableFlag(CountryCode countryCode)
{
this.countryCode = countryCode;
description = countryCode.GetDescription();
}
[BackgroundDependencyLoader]