From 43a1df6e5c61a46f322d8f3404c9ad614c68560b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 27 Feb 2019 17:30:20 +0900 Subject: [PATCH] Inline cancellation token source creation --- osu.Game/Screens/Play/SquareGraph.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game/Screens/Play/SquareGraph.cs b/osu.Game/Screens/Play/SquareGraph.cs index 69f9bff550..4ba390c165 100644 --- a/osu.Game/Screens/Play/SquareGraph.cs +++ b/osu.Game/Screens/Play/SquareGraph.cs @@ -121,7 +121,6 @@ namespace osu.Game.Screens.Play } cts?.Cancel(); - cts = new CancellationTokenSource(); LoadComponentAsync(newColumns, c => { @@ -131,7 +130,7 @@ namespace osu.Game.Screens.Play recalculateValues(); redrawFilled(); redrawProgress(); - }, cts.Token); + }, (cts = new CancellationTokenSource()).Token); } ///