Browse Source

* Delphi compatible hash again compatible

Michaël Van Canneyt 1 year ago
parent
commit
d8e4544fbe
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/rtl-generics/src/generics.hashes.pas

+ 2 - 2
packages/rtl-generics/src/generics.hashes.pas

@@ -989,7 +989,7 @@ label Case12, Case11, Case10, Case9, Case8, Case7, Case6, Case5, Case4, Case3, C
 
 begin
   //* Set up the internal state */
-  a := $DEADBEEF + UInt32(ALength shl 2) + APrimaryHashAndInitVal; // delphi version bug? original version don't have "shl 2"
+  a := $DEADBEEF + UInt32(ALength) + APrimaryHashAndInitVal;
   b := a;
   c := b;
   c += ASecondaryHashAndInitVal;
@@ -1265,7 +1265,7 @@ label Case12, Case11, Case10, Case9, Case8, Case7, Case6, Case5, Case4, Case3, C
 {$ENDIF NOGOTO}
 
 begin
-  a := $DEADBEEF + UInt32(ALength shl 2) + AInitVal; // delphi version bug? original version don't have "shl 2"
+  a := $DEADBEEF + UInt32(ALength) + AInitVal;
   b := a;
   c := b;