mirror of
https://github.com/ppy/osu
synced 2025-01-06 06:10:04 +00:00
Use is
pattern matching
This commit is contained in:
parent
69d9a0ae1a
commit
198a1750c3
@ -77,8 +77,8 @@ namespace osu.Game.Skinning
|
||||
switch (legacy)
|
||||
{
|
||||
case LegacySkinConfigurations.Version:
|
||||
if (Configuration.LegacyVersion != null)
|
||||
return SkinUtils.As<TValue>(new Bindable<decimal>((decimal)Configuration.LegacyVersion));
|
||||
if (Configuration.LegacyVersion is decimal version)
|
||||
return SkinUtils.As<TValue>(new Bindable<decimal>(version));
|
||||
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user