Apply brace style.

This commit is contained in:
Huo Yaoyuan
2019-11-11 19:53:22 +08:00
parent 3d1c31f2ae
commit ccc8aa6fa4
58 changed files with 214 additions and 52 deletions

View File

@ -113,8 +113,10 @@ namespace osu.Game.Rulesets.Objects.Drawables
if (samples.Length > 0)
{
if (HitObject.SampleControlPoint == null)
{
throw new ArgumentNullException(nameof(HitObject.SampleControlPoint), $"{nameof(HitObject)}s must always have an attached {nameof(HitObject.SampleControlPoint)}."
+ $" This is an indication that {nameof(HitObject.ApplyDefaults)} has not been invoked on {this}.");
}
samples = samples.Select(s => HitObject.SampleControlPoint.ApplyTo(s)).ToArray();
foreach (var s in samples)

View File

@ -75,8 +75,10 @@ namespace osu.Game.Rulesets.Objects.Legacy
int pointCount = 1;
foreach (var t in pointSplit)
{
if (t.Length > 1)
pointCount++;
}
var points = new Vector2[pointCount];

View File

@ -185,8 +185,10 @@ namespace osu.Game.Rulesets.Objects
ReadOnlySpan<Vector2> cpSpan = ControlPoints.Slice(start, end - start);
foreach (Vector2 t in calculateSubpath(cpSpan))
{
if (calculatedPath.Count == 0 || calculatedPath.Last() != t)
calculatedPath.Add(t);
}
start = end;
}