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:
parent
9b30fc484a
commit
dd36942508
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user