mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
Remove redundant bitwise operations
This commit is contained in:
committed by
Ben Ramsey
parent
bc201fe3e4
commit
580027e79b
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user