Fix RCS1058
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user