Remove redundant bitwise operations

This commit is contained in:
Nikita Konstantinov
2019-09-09 00:28:21 +03:00
committed by Ben Ramsey
parent bc201fe3e4
commit 580027e79b
-2
View File
@@ -18,7 +18,6 @@ class BinaryUtils
{
// Set the variant to RFC 4122
$clockSeqHi = $clockSeqHi & 0x3f;
$clockSeqHi &= ~(0xc0);
$clockSeqHi |= 0x80;
return $clockSeqHi;
@@ -35,7 +34,6 @@ class BinaryUtils
public static function applyVersion($timeHi, $version)
{
$timeHi = hexdec($timeHi) & 0x0fff;
$timeHi &= ~(0xf000);
$timeHi |= $version << 12;
return $timeHi;