Use `is` pattern matching

This commit is contained in:
iiSaLMaN 2019-11-06 20:46:02 +03:00
parent 69d9a0ae1a
commit 198a1750c3
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}