Add new .NET 9 rules to editorconfig.
Don't enforce all the rules yet, since we are still targeting .NET 6. Adjust cast to nullable in UnloadCargo.ChooseExitSubCell. Avoid this cast tripping up CA2021 on older NET SDK versions.
This commit is contained in:
committed by
Pavel Penev
parent
7401182a1b
commit
9809f6ed08
@@ -55,8 +55,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
|
||||
return cargo.CurrentAdjacentCells()
|
||||
.Shuffle(self.World.SharedRandom)
|
||||
.Select(c => (c, pos.GetAvailableSubCell(c)))
|
||||
.Cast<(CPos, SubCell SubCell)?>()
|
||||
.Select(c => ((CPos Cell, SubCell SubCell)?)(c, pos.GetAvailableSubCell(c)))
|
||||
.FirstOrDefault(s => s.Value.SubCell != SubCell.Invalid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user