C# 14 fixes (#41708)

Necessary for the move to .NET 10 & C# 14. Actual PR to change SS14 to C# 14 will be separate.
This commit is contained in:
Pieter-Jan Briers
2025-12-05 13:37:02 +01:00
committed by GitHub
parent 8d6097be9a
commit da3e331366

View File

@@ -98,10 +98,13 @@ public sealed class ParallaxManager : IParallaxManager
}
else
{
layers = await Task.WhenAll(
// Explicitly allocate params array to avoid sandbox violation since C# 14.
var tasks = new[]
{
LoadParallaxLayers(parallaxPrototype.Layers, loadedLayers, cancel),
LoadParallaxLayers(parallaxPrototype.LayersLQ, loadedLayers, cancel)
);
LoadParallaxLayers(parallaxPrototype.LayersLQ, loadedLayers, cancel),
};
layers = await Task.WhenAll(tasks);
}
cancel.ThrowIfCancellationRequested();