DEADSOFTWARE

migrating from PanelIDs to panel GUIDs; part one
[d2df-sdl.git] / src / shared / hashtable.pas
index 9f72e3ab2f5fb547da371473cc30e87e8b47887b..ea71555c68ff7a6d4c4fa2db980990e96f41d8e0 100644 (file)
@@ -173,6 +173,11 @@ function joaatHash (constref buf; len: LongWord): LongWord;
 function nextPOT (x: LongWord): LongWord; inline;
 
 
+// for integer keys
+function hiiequ (constref a, b: Integer): Boolean;
+function hiihash (constref k: Integer): LongWord;
+
+
 implementation
 
 uses
@@ -204,7 +209,7 @@ function hsiequ (constref a, b: AnsiString): Boolean; begin result := (a = b); e
 {$RANGECHECKS OFF}
 function hiihash (constref k: Integer): LongWord;
 begin
-  result := k;
+  result := LongWord(k);
   result -= (result shl 6);
   result := result xor (result shr 17);
   result -= (result shl 9);