mirror of https://github.com/ppy/osu
Use `is` pattern matching
This commit is contained in:
parent
69d9a0ae1a
commit
198a1750c3
|
@ -77,8 +77,8 @@ public override IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup)
|
|||
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