Fix RCS1058

This commit is contained in:
RoosterDragon
2023-03-18 12:05:13 +00:00
committed by Gustas
parent d1dc6293e8
commit 1a299d10ed
4 changed files with 6 additions and 3 deletions

View File

@@ -974,6 +974,9 @@ dotnet_diagnostic.RCS1048.severity = warning
# Simplify boolean comparison.
dotnet_diagnostic.RCS1049.severity = warning
# Use compound assignment.
dotnet_diagnostic.RCS1058.severity = warning
# Avoid locking on publicly accessible instance.
dotnet_diagnostic.RCS1059.severity = warning

View File

@@ -79,7 +79,7 @@ namespace OpenRA.Support
var y = (mt[i] & 0x80000000) | (mt[(i + 1) % 624] & 0x7fffffff);
mt[i] = mt[(i + 397u) % 624u] ^ (y >> 1);
if ((y & 1) == 1)
mt[i] = mt[i] ^ 2567483615;
mt[i] ^= 2567483615;
}
}
}

View File

@@ -149,7 +149,7 @@ namespace OpenRA.Mods.Cnc.FileFormats
if (bits == 0) return;
for (i = 0; i < len - 1; i++) n[i] = (n[i] >> bits) | (n[i + 1] << (32 - bits));
n[i] = n[i] >> bits;
n[i] >>= bits;
}
static void ShlBigNum(uint[] n, int bits, int len)

View File

@@ -82,7 +82,7 @@ namespace OpenRA.Mods.D2k.Traits
if (world.ActorMap.GetActorsAt(cell).Any(a => a.TraitOrDefault<Building>() != null))
return;
strength[cell] = strength[cell] - damage;
strength[cell] -= damage;
if (strength[cell] < 1)
RemoveTile(cell);
}