mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 21:42:56 +08:00
Change switchexpr to standard switch statement
This commit is contained in:
parent
577cb9994c
commit
25c1a90047
@ -46,14 +46,29 @@ namespace osu.Game.Rulesets.Objects.Types
|
||||
return new PathType { Type = SplineType.BSpline, Degree = degree };
|
||||
}
|
||||
|
||||
public string Description => Type switch
|
||||
public string Description
|
||||
{
|
||||
SplineType.Catmull => "Catmull",
|
||||
SplineType.BSpline => Degree == null ? "Bezier" : "B-Spline",
|
||||
SplineType.Linear => "Linear",
|
||||
SplineType.PerfectCurve => "Perfect Curve",
|
||||
_ => Type.ToString()
|
||||
};
|
||||
get
|
||||
{
|
||||
switch (Type)
|
||||
{
|
||||
case SplineType.Catmull:
|
||||
return "Catmull";
|
||||
|
||||
case SplineType.BSpline:
|
||||
return Degree == null ? "Bezier" : "B-Spline";
|
||||
|
||||
case SplineType.Linear:
|
||||
return "Linear";
|
||||
|
||||
case SplineType.PerfectCurve:
|
||||
return "Perfect Curve";
|
||||
|
||||
default:
|
||||
return Type.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
=> HashCode.Combine(Type, Degree);
|
||||
|
Loading…
Reference in New Issue
Block a user