Skip to content

Commit

Permalink
Cleanup debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
dries-c committed Dec 3, 2024
1 parent d55b7fc commit 835f937
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/serializer/BitSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function write(PacketSerializer $out) : void{
$nextShift = $currentShift + self::SHIFT;
if($nextShift >= self::INT_BITS){
$nextShift -= self::INT_BITS;
$bits |= ($parts[++$currentIndex] ?? 0) << (self::SHIFT - $nextShift);
$bits |= $parts[++$currentIndex] << (self::SHIFT - $nextShift);
}
$currentShift = $nextShift;

Expand Down
2 changes: 0 additions & 2 deletions tests/phpunit/BitSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,11 @@ public function testVarUnsignedLongCompatibility() : void{
private function setsEqual(BitSet $a, BitSet $b) : bool{
$length = $a->getLength();
if($length !== $b->getLength()){
var_dump($length, $b->getLength());
return false;
}

for($i = 0; $i < $length; ++$i){
if($a->get($i) !== $b->get($i)){
var_dump($i, $a->get($i), $b->get($i));
return false;
}
}
Expand Down

0 comments on commit 835f937

Please sign in to comment.