diff dcrypt/misc/checksums/CRC32.d @ 34:b1d9be1b3a34

Added additional overrides to Adler32 and CRC32 in dcrypt.misc.checksums in further hopes of D2 compatibility.
author Thomas Dixon <reikon@reikon.us>
date Thu, 14 May 2009 05:31:58 -0400
parents 21847420b1ac
children
line wrap: on
line diff
--- 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";