mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Use index and range expressions
This commit is contained in:
@ -157,7 +157,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
|
||||
private TimingControlPoint getNextTimingPoint(TimingControlPoint current)
|
||||
{
|
||||
if (timingPoints[timingPoints.Count - 1] == current)
|
||||
if (timingPoints[^1] == current)
|
||||
return current;
|
||||
|
||||
int index = timingPoints.IndexOf(current); // -1 means that this is a "default beat"
|
||||
@ -169,7 +169,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
{
|
||||
if (timingPoints.Count == 0) return 0;
|
||||
|
||||
if (timingPoints[timingPoints.Count - 1] == current)
|
||||
if (timingPoints[^1] == current)
|
||||
return (int)Math.Ceiling((Beatmap.Value.Track.Length - current.Time) / current.BeatLength);
|
||||
|
||||
return (int)Math.Ceiling((getNextTimingPoint(current).Time - current.Time) / current.BeatLength);
|
||||
|
Reference in New Issue
Block a user