Utils: remove 32-bit specific code from javaStringHash()

this was necessary in the days of 32-bit, but for 64-bit, the 0xffffffff mask is sufficient and produces the exact same result.
This commit is contained in:
Dylan K. Taylor 2022-09-02 18:23:49 +01:00
parent 973a56ab28
commit 1d253bc8c2
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -366,12 +366,6 @@ final class Utils{
$ord -= 0x100;
}
$hash = 31 * $hash + $ord;
while($hash > 0x7FFFFFFF){
$hash -= 0x100000000;
}
while($hash < -0x80000000){
$hash += 0x100000000;
}
$hash &= 0xFFFFFFFF;
}
return $hash;