DEADSOFTWARE

mapdef cleanup; renamed some fields; mapdef.txt is RC0 now
[d2df-sdl.git] / src / shared / hashtable.pas
index ea71555c68ff7a6d4c4fa2db980990e96f41d8e0..8aaa522a45bae64530243a8fa031f42b4b035b4f 100644 (file)
@@ -161,9 +161,11 @@ type
 type
   THashIntInt = specialize THashBase<Integer, Integer>;
   THashStrInt = specialize THashBase<AnsiString, Integer>;
+  THashStrStr = specialize THashBase<AnsiString, AnsiString>;
 
 function hashNewIntInt (): THashIntInt;
 function hashNewStrInt (): THashStrInt;
+function hashNewStrStr (): THashStrStr;
 
 
 function u32Hash (a: LongWord): LongWord; inline;
@@ -176,6 +178,8 @@ function nextPOT (x: LongWord): LongWord; inline;
 // for integer keys
 function hiiequ (constref a, b: Integer): Boolean;
 function hiihash (constref k: Integer): LongWord;
+function hsiequ (constref a, b: AnsiString): Boolean;
+function hsihash (constref k: AnsiString): LongWord;
 
 
 implementation
@@ -238,6 +242,12 @@ begin
 end;
 
 
+function hashNewStrStr (): THashStrStr;
+begin
+  result := THashStrStr.Create(hsihash, hsiequ);
+end;
+
+
 // ////////////////////////////////////////////////////////////////////////// //
 {$PUSH}
 {$RANGECHECKS OFF}