diff --git a/.editorconfig b/.editorconfig index b0f0d10eb8..33adb71f86 100644 --- a/.editorconfig +++ b/.editorconfig @@ -183,6 +183,9 @@ dotnet_diagnostic.IDE0051.severity = warning # Remove unread private member. dotnet_diagnostic.IDE0052.severity = warning +# Use compound assignment. +dotnet_diagnostic.IDE0054.severity = warning + # Unnecessary value assignment. dotnet_diagnostic.IDE0059.severity = warning diff --git a/OpenRA.Mods.Cnc/FileFormats/BlowfishKeyProvider.cs b/OpenRA.Mods.Cnc/FileFormats/BlowfishKeyProvider.cs index ed4d65b5d5..e966665558 100644 --- a/OpenRA.Mods.Cnc/FileFormats/BlowfishKeyProvider.cs +++ b/OpenRA.Mods.Cnc/FileFormats/BlowfishKeyProvider.cs @@ -144,7 +144,7 @@ namespace OpenRA.Mods.Cnc.FileFormats { for (i = 0; i < len - i2; i++) n[i] = n[i + i2]; for (; i < len; i++) n[i] = 0; - bits = bits % 32; + bits %= 32; } if (bits == 0) return; @@ -161,7 +161,7 @@ namespace OpenRA.Mods.Cnc.FileFormats { for (i = len - 1; i > i2; i--) n[i] = n[i - i2]; for (; i > 0; i--) n[i] = 0; - bits = bits % 32; + bits %= 32; } if (bits == 0) return; diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/AirstrikePower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/AirstrikePower.cs index 59d3fb9432..b042ea576c 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/AirstrikePower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/AirstrikePower.cs @@ -86,7 +86,7 @@ namespace OpenRA.Mods.Common.Traits var altitude = self.World.Map.Rules.Actors[info.UnitType].TraitInfo().CruiseAltitude.Length; var attackRotation = WRot.FromYaw(facing.Value); var delta = new WVec(0, -1024, 0).Rotate(attackRotation); - target = target + new WVec(0, 0, altitude); + target += new WVec(0, 0, altitude); var startEdge = target - (self.World.Map.DistanceToEdge(target, -delta) + info.Cordon).Length * delta / 1024; var finishEdge = target + (self.World.Map.DistanceToEdge(target, delta) + info.Cordon).Length * delta / 1024;