# HG changeset patch # User Thomas Dixon # Date 1242293518 14400 # Node ID b1d9be1b3a34899146632b5482b18382b0a80ce9 # Parent b9f8aa42a5479ebcf75d045907cf9fe1f3bc08c1 Added additional overrides to Adler32 and CRC32 in dcrypt.misc.checksums in further hopes of D2 compatibility. diff -r b9f8aa42a547 -r b1d9be1b3a34 dcrypt/misc/checksums/Adler32.d --- a/dcrypt/misc/checksums/Adler32.d Thu May 14 01:33:11 2009 -0400 +++ b/dcrypt/misc/checksums/Adler32.d Thu May 14 05:31:58 2009 -0400 @@ -36,6 +36,15 @@ return (s2 << 16) + s1; } + /** Play nice with D2's idea of const. */ + version (D_Version2) + { + uint compute(string input) + { + return compute(cast(ubyte[])input); + } + } + string name() { return "Adler32"; diff -r b9f8aa42a547 -r b1d9be1b3a34 dcrypt/misc/checksums/CRC32.d --- a/dcrypt/misc/checksums/CRC32.d Thu May 14 01:33:11 2009 -0400 +++ b/dcrypt/misc/checksums/CRC32.d Thu May 14 05:31:58 2009 -0400 @@ -79,6 +79,15 @@ return (crc ^ 0xffffffff); } + /** Play nice with D2's idea of const. */ + version (D_Version2) + { + uint compute(string input) + { + return compute(cast(ubyte[])input); + } + } + string name() { return "CRC32";