mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Use nullable cancellation tokens
This commit is contained in:
@ -141,7 +141,7 @@ namespace osu.Game.Rulesets.UI
|
||||
public virtual PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new PlayfieldAdjustmentContainer();
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config, CancellationToken cancellationToken)
|
||||
private void load(OsuConfigManager config, CancellationToken? cancellationToken)
|
||||
{
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
@ -170,18 +170,15 @@ namespace osu.Game.Rulesets.UI
|
||||
/// <summary>
|
||||
/// Creates and adds drawable representations of hit objects to the play field.
|
||||
/// </summary>
|
||||
private void loadObjects(CancellationToken cancellationToken)
|
||||
private void loadObjects(CancellationToken? cancellationToken)
|
||||
{
|
||||
foreach (TObject h in Beatmap.HitObjects)
|
||||
{
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
break;
|
||||
|
||||
cancellationToken?.ThrowIfCancellationRequested();
|
||||
addHitObject(h);
|
||||
}
|
||||
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
return;
|
||||
cancellationToken?.ThrowIfCancellationRequested();
|
||||
|
||||
Playfield.PostProcess();
|
||||
|
||||
|
Reference in New Issue
Block a user