mirror of
https://github.com/ppy/osu.git
synced 2026-05-28 02:25:29 +08:00
Use null check and pattern matching
This commit is contained in:
@@ -77,8 +77,8 @@ namespace osu.Game.Skinning
|
||||
switch (legacy)
|
||||
{
|
||||
case LegacySkinConfigurations.Version:
|
||||
if (Configuration.LegacyVersion.HasValue)
|
||||
return SkinUtils.As<TValue>(new Bindable<decimal>(Configuration.LegacyVersion.Value));
|
||||
if (Configuration.LegacyVersion != null)
|
||||
return SkinUtils.As<TValue>(new Bindable<decimal>((decimal)Configuration.LegacyVersion));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user