From 1d253bc8c2761ef9f4472d5a328fc45fd40e21f8 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 2 Sep 2022 18:23:49 +0100 Subject: [PATCH] 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. --- src/utils/Utils.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/utils/Utils.php b/src/utils/Utils.php index 8d27c9861..d5ecae996 100644 --- a/src/utils/Utils.php +++ b/src/utils/Utils.php @@ -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;