From 624e90b213f4e328add5723206555fd1b56e0374 Mon Sep 17 00:00:00 2001 From: tsrk Date: Wed, 11 Jan 2023 21:32:12 +0100 Subject: [PATCH] style: nitpicks --- .../Graphics/UserInterface/SegmentedGraph.cs | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/SegmentedGraph.cs b/osu.Game/Graphics/UserInterface/SegmentedGraph.cs index f8c5c08bbf..d0356e6327 100644 --- a/osu.Game/Graphics/UserInterface/SegmentedGraph.cs +++ b/osu.Game/Graphics/UserInterface/SegmentedGraph.cs @@ -136,7 +136,7 @@ namespace osu.Game.Graphics.UserInterface segments.Sort(); } - private Colour4 tierToColour(int tier) => tier >= 0 ? TierColours[tier] : new Colour4(0, 0, 0, 0); + private Colour4 getTierColour(int tier) => tier >= 0 ? TierColours[tier] : new Colour4(0, 0, 0, 0); protected override DrawNode CreateDrawNode() => new SegmentedGraphDrawNode(this); @@ -217,7 +217,7 @@ namespace osu.Game.Graphics.UserInterface Vector2Extensions.Transform(topRight, DrawInfo.Matrix), Vector2Extensions.Transform(bottomLeft, DrawInfo.Matrix), Vector2Extensions.Transform(bottomRight, DrawInfo.Matrix)), - Source.tierToColour(segment.Tier)); + Source.getTierColour(segment.Tier)); } shader.Unbind(); @@ -263,12 +263,12 @@ namespace osu.Game.Graphics.UserInterface { foreach (SegmentInfo? pendingSegment in pendingSegments) { - if (pendingSegment != null) - { - SegmentInfo finalizedSegment = pendingSegment.Value; - finalizedSegment.End = 1; - segments.Add(finalizedSegment); - } + if (pendingSegment == null) + continue; + + SegmentInfo finalizedSegment = pendingSegment.Value; + finalizedSegment.End = 1; + segments.Add(finalizedSegment); } } @@ -305,13 +305,7 @@ namespace osu.Game.Graphics.UserInterface Add(segment); } - public bool IsTierStarted(int tier) - { - if (tier < 0) - return false; - - return pendingSegments[tier].HasValue; - } + public bool IsTierStarted(int tier) => tier >= 0 && pendingSegments[tier].HasValue; public IEnumerator GetEnumerator() => segments.GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();