Use pattern matching wherever possible

This commit is contained in:
Dean Herbert
2019-02-28 14:35:00 +09:00
parent 94a389319d
commit e2c6a8bc07
13 changed files with 17 additions and 29 deletions

View File

@ -127,8 +127,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
{
Vector2 pos = hitObject.StackedPosition;
var slider = hitObject as Slider;
if (slider != null)
if (hitObject is Slider slider)
{
computeSliderCursorPosition(slider);
pos = slider.LazyEndPosition ?? pos;