1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:35:10 +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; private readonly CountryCode countryCode;
public LocalisableString TooltipText => tooltipText; public LocalisableString TooltipText { get; }
private readonly string tooltipText;
public DrawableFlag(CountryCode countryCode) public DrawableFlag(CountryCode countryCode)
{ {
this.countryCode = countryCode; this.countryCode = countryCode;
tooltipText = countryCode == CountryCode.Unknown ? string.Empty : countryCode.GetDescription(); TooltipText = countryCode == CountryCode.Unknown ? string.Empty : countryCode.GetDescription();
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]