Unnecessary "?:"

This commit is contained in:
Sunch 2024-08-17 20:01:40 +08:00
parent 4630481d54
commit 4eb6bd14a2
6 changed files with 9 additions and 9 deletions

View file

@ -63,7 +63,7 @@ class RailLogic
}
public function canConnectTo(RailLogic $rail){
return $this->connectsTo($rail) ? true : (count($this->railPositions) == 2 ? false : (empty($this->railPositions) ? true : true));
return $this->connectsTo($rail) || ((count($this->railPositions) == 2 ? false : (empty($this->railPositions) ? true : true)));
}
public function hasNeighborRail($x, $y, $z){

View file

@ -581,7 +581,7 @@ class Utils{
}
public static function readBool($b){
return Utils::readByte($b, false) === 0 ? false : true;
return !(Utils::readByte($b, false) === 0);
}
public static function writeBool($b){