mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09:00
Use debug.assert for better readable.
This commit is contained in:
parent
0a1543c6e8
commit
8c2f4b48fc
@ -9,7 +9,6 @@ using System.Threading.Tasks;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Development;
|
using osu.Framework.Development;
|
||||||
using osu.Framework.Extensions.ObjectExtensions;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
@ -189,7 +188,10 @@ namespace osu.Game.Online.Spectator
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (frame is IConvertibleReplayFrame convertible)
|
if (frame is IConvertibleReplayFrame convertible)
|
||||||
pendingFrames.Enqueue(convertible.ToLegacy(currentBeatmap.AsNonNull()));
|
{
|
||||||
|
Debug.Assert(currentBeatmap != null);
|
||||||
|
pendingFrames.Enqueue(convertible.ToLegacy(currentBeatmap));
|
||||||
|
}
|
||||||
|
|
||||||
if (pendingFrames.Count > max_pending_frames)
|
if (pendingFrames.Count > max_pending_frames)
|
||||||
purgePendingFrames();
|
purgePendingFrames();
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using osu.Framework.Extensions;
|
using osu.Framework.Extensions;
|
||||||
using osu.Framework.Extensions.ObjectExtensions;
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Beatmaps.Formats;
|
using osu.Game.Beatmaps.Formats;
|
||||||
using osu.Game.Extensions;
|
using osu.Game.Extensions;
|
||||||
@ -144,7 +144,8 @@ namespace osu.Game.Scoring.Legacy
|
|||||||
return legacyFrame;
|
return legacyFrame;
|
||||||
|
|
||||||
case IConvertibleReplayFrame convertibleFrame:
|
case IConvertibleReplayFrame convertibleFrame:
|
||||||
return convertibleFrame.ToLegacy(beatmap.AsNonNull());
|
Debug.Assert(beatmap != null);
|
||||||
|
return convertibleFrame.ToLegacy(beatmap);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new ArgumentException(@"Frame could not be converted to legacy frames", nameof(replayFrame));
|
throw new ArgumentException(@"Frame could not be converted to legacy frames", nameof(replayFrame));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user