Apply suggested refactorings

This commit is contained in:
smoogipoo
2019-12-10 13:12:54 +09:00
parent 2c4c190f15
commit ab0f2e7c6a
2 changed files with 7 additions and 9 deletions

View File

@ -257,14 +257,13 @@ namespace osu.Game.Rulesets.Objects.Legacy
{
if (type == PathType.PerfectCurve)
{
if (vertices.Length == 3)
if (vertices.Length != 3)
type = PathType.Bezier;
else if (isLinear(vertices))
{
// osu-stable special-cased colinear perfect curves to a linear path
if (isLinear(vertices))
type = PathType.Linear;
type = PathType.Linear;
}
else
type = PathType.Bezier;
}
var points = new List<PathControlPoint>(vertices.Length)