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)
|
switch (legacy)
|
||||||
{
|
{
|
||||||
case LegacySkinConfigurations.Version:
|
case LegacySkinConfigurations.Version:
|
||||||
if (Configuration.LegacyVersion != null)
|
if (Configuration.LegacyVersion is decimal version)
|
||||||
return SkinUtils.As<TValue>(new Bindable<decimal>((decimal)Configuration.LegacyVersion));
|
return SkinUtils.As<TValue>(new Bindable<decimal>(version));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue