diff --git a/OpenRA.FileFormats/FileFormats/CRC32.cs b/OpenRA.FileFormats/FileFormats/CRC32.cs
index 22fd2077c5..61de944e55 100644
--- a/OpenRA.FileFormats/FileFormats/CRC32.cs
+++ b/OpenRA.FileFormats/FileFormats/CRC32.cs
@@ -96,14 +96,18 @@ namespace OpenRA.FileFormats
///
/// The calculated checksum.
///
- public static uint Calculate(byte[] data, uint polynomal = 0xFFFFFFFF)
+ public static uint Calculate(byte[] data, uint polynomial)
{
- uint crc = polynomal;
+ uint crc = polynomial;
for (int i = 0; i < data.Length; i++)
crc = (crc >> 8) ^ lookUp[(crc & 0xFF) ^ data[i]];
- crc ^= polynomal;
+ crc ^= polynomial;
return crc;
}
+ public static uint Calculate(byte[] data)
+ {
+ return Calculate(data, 0xFFFFFFFF);
+ }
///
/// A fast (native) CRC32 implementation that can be used on a pinned byte array using
@@ -113,13 +117,17 @@ namespace OpenRA.FileFormats
/// The length of the data data.
/// The polynomal to xor with.
/// The calculated checksum.
- public static unsafe uint Calculate(byte* data, uint len, uint polynomal = 0xFFFFFFFF)
+ public static unsafe uint Calculate(byte* data, uint len, uint polynomial)
{
- uint crc = polynomal;
+ uint crc = polynomial;
for (int i = 0; i < len; i++)
crc = (crc >> 8) ^ lookUp[(crc & 0xFF) ^ *data++];
- crc ^= polynomal;
+ crc ^= polynomial;
return crc;
}
+ public static unsafe uint Calculate(byte* data, uint len)
+ {
+ return Calculate(data, len, 0xFFFFFFFF);
+ }
}
}
\ No newline at end of file
diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs
index 7bb15d84e6..c25260e0ca 100644
--- a/OpenRA.Mods.RA/AI/HackyAI.cs
+++ b/OpenRA.Mods.RA/AI/HackyAI.cs
@@ -500,12 +500,16 @@ namespace OpenRA.Mods.RA.AI
return squads.Where(s => s.type == type).FirstOrDefault();
}
- Squad RegisterNewSquad(SquadType type, Actor target = null)
+ Squad RegisterNewSquad(SquadType type, Actor target)
{
var ret = new Squad(this, type, target);
squads.Add(ret);
return ret;
}
+ Squad RegisterNewSquad(SquadType type)
+ {
+ return RegisterNewSquad(type, null);
+ }
int assignRolesTicks = 0;
int rushTicks = 0;