Use standard switch syntax (preferred for now)

This commit is contained in:
Dean Herbert 2020-11-30 15:39:08 +09:00
parent 0c36a3c263
commit 809caaa44c

View File

@ -302,14 +302,21 @@ namespace osu.Game.Tests.Visual.Gameplay
TimeRange.Value = time_range; TimeRange.Value = time_range;
} }
public override DrawableHitObject<TestHitObject> CreateDrawableRepresentation(TestHitObject h) => public override DrawableHitObject<TestHitObject> CreateDrawableRepresentation(TestHitObject h)
h switch {
switch (h)
{ {
TestPooledHitObject _ => null, case TestPooledHitObject _:
TestPooledParentHitObject _ => null, case TestPooledParentHitObject _:
TestParentHitObject p => new DrawableTestParentHitObject(p), return null;
_ => new DrawableTestHitObject(h),
}; case TestParentHitObject p:
return new DrawableTestParentHitObject(p);
default:
return new DrawableTestHitObject(h);
}
}
protected override PassThroughInputManager CreateInputManager() => new PassThroughInputManager(); protected override PassThroughInputManager CreateInputManager() => new PassThroughInputManager();