From 24c19f64c992affc651ee416dee4eccc715eb4b6 Mon Sep 17 00:00:00 2001 From: RoosterDragon Date: Tue, 11 Nov 2025 18:34:59 +0000 Subject: [PATCH] Fix IDE0350 --- .editorconfig | 4 ++++ OpenRA.Mods.Common/MapGenerator/Terraformer.cs | 2 +- .../Traits/BotModules/Squads/AttackOrFleeFuzzy.cs | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index af8c093926..170c43f712 100644 --- a/.editorconfig +++ b/.editorconfig @@ -330,6 +330,10 @@ dotnet_diagnostic.IDE0304.severity = warning # From above, uses dotnet_style_prefer_collection_expression dotnet_diagnostic.IDE0305.severity = silent +# IDE0350 Use implicitly typed lambda +#csharp_style_prefer_implicitly_typed_lambda_expression = true +dotnet_diagnostic.IDE0350.severity = warning + ## Field preferences # IDE0044 Add readonly modifier diff --git a/OpenRA.Mods.Common/MapGenerator/Terraformer.cs b/OpenRA.Mods.Common/MapGenerator/Terraformer.cs index ee42b97ba5..67068c009a 100644 --- a/OpenRA.Mods.Common/MapGenerator/Terraformer.cs +++ b/OpenRA.Mods.Common/MapGenerator/Terraformer.cs @@ -427,7 +427,7 @@ namespace OpenRA.Mods.Common.MapGenerator incompatibilities, Rotations, Mirror, - (CPos[] sources, CPos destination) => + (sources, destination) => { if (!dominant[destination]) incompatibilities[destination] = sources diff --git a/OpenRA.Mods.Common/Traits/BotModules/Squads/AttackOrFleeFuzzy.cs b/OpenRA.Mods.Common/Traits/BotModules/Squads/AttackOrFleeFuzzy.cs index 92d1b3f9bc..6cb5ecedb4 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/Squads/AttackOrFleeFuzzy.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/Squads/AttackOrFleeFuzzy.cs @@ -227,7 +227,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads static float RelativeSpeed(IReadOnlyCollection own, IReadOnlyCollection enemy) { - return RelativeValue(own, enemy, 100, Average, (Actor a) => a.Info.TraitInfo().Speed); + return RelativeValue(own, enemy, 100, Average, a => a.Info.TraitInfo().Speed); } static float RelativeValue(IReadOnlyCollection own, IReadOnlyCollection enemy, float normalizeByValue,