Fix IDE0028, IDE0300, IDE0301, IDE0302, IDE0303, IDE0304.

Silence IDE0305.
This commit is contained in:
RoosterDragon
2025-03-03 17:29:45 +00:00
committed by Pavel Penev
parent 0740991c12
commit 79454d8fd2
559 changed files with 1661 additions and 1751 deletions

View File

@@ -131,13 +131,13 @@ namespace OpenRA.Mods.Cnc.FileFormats
}
readonly uint[] lookupMfromP =
{
[
0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,
0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917,
0x9216d5d9, 0x8979fb1b
};
];
readonly uint[,] lookupMfromS =
{

View File

@@ -22,8 +22,8 @@ namespace OpenRA.Mods.Cnc.FileFormats
/// <summary>
/// The CRC32 lookup table.
/// </summary>
static readonly uint[] LookUp = new uint[256]
{
static readonly uint[] LookUp =
[
0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
@@ -88,7 +88,7 @@ namespace OpenRA.Mods.Cnc.FileFormats
0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
};
];
/// <summary>
/// A CRC32 implementation that can be used on spans of bytes.

View File

@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Cnc.FileFormats
SoundCount = s.ReadInt32();
Entries = new List<IdxEntry>();
Entries = [];
for (var i = 0; i < SoundCount; i++)
Entries.Add(new IdxEntry(s));

View File

@@ -49,7 +49,7 @@ namespace OpenRA.Mods.Cnc.FileFormats
using (var writer = new BinaryWriter(data))
{
writer.Write(Encoding.ASCII.GetBytes("XCC by Olaf van der Spek"));
writer.Write(new byte[] { 0x1A, 0x04, 0x17, 0x27, 0x10, 0x19, 0x80, 0x00 });
writer.Write([0x1A, 0x04, 0x17, 0x27, 0x10, 0x19, 0x80, 0x00]);
writer.Write(Entries.Sum(e => e.Length) + Entries.Length + 52); // Size
writer.Write(0); // Type