Skip to content

Commit ca1eed7

Browse files
committed
closes #1
1 parent 13375b1 commit ca1eed7

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

lib/common/customFunctions.php

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,9 @@ function arraycopy($srcArray,$srcPos,$destArray, $destPos, $length){//System.arr
77
}
88

99

10-
function overflow32($value) {
11-
$value = $value % 4294967296;
12-
if ($value > 2147483647) {
13-
return $value - 4294967296;
14-
} elseif ($value < -2147483648) {
15-
return $value + 4294967296;
16-
} else {
17-
return $value;
18-
} // if
19-
} // overflow32()
10+
function overflow32($value) {//There is no need to overflow 64 bits to 32 bit
11+
return $value;
12+
}
2013

2114
function hashCode( $s )
2215
{
@@ -33,10 +26,10 @@ function hashCode( $s )
3326

3427
function numberOfTrailingZeros($i) {
3528
if ($i == 0) return 32;
36-
(int)$num = 0;
29+
$num = 0;
3730
while (($i & 1) == 0) {
3831
$i >>= 1;
39-
$num ++;
32+
$num++;
4033
}
4134
return $num;
4235
}

0 commit comments

Comments
 (0)