1
0
mirror of https://github.com/ppy/osu.git synced 2024-05-15 01:50:46 +08:00

Simplify assignment by using an auto property

This commit is contained in:
Dean Herbert 2024-03-09 20:17:27 +08:00
parent 58b6acde10
commit b8a362fcb6
No known key found for this signature in database

View File

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