mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
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:
parent
973a56ab28
commit
1d253bc8c2
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user