Closed dlbbld closed 2 years ago
The following line in semistatic.cpp is hard to read:
if (distance<Square>(s,t) == 1 && loserKingRegion & t) {
It's recommended to use parentheses to show evaluation precedence when using logical AND and bitwise AND in the same expression.
The code otherwise already follows this recommendation, like below in semistatic.cpp:
if ((visitors & s) && type_of(pos.piece_on(s)) != BISHOP)
As such I suggest to add parentheses in the expression as below: if (distance<Square>(s,t) == 1 && (loserKingRegion & t)) {
if (distance<Square>(s,t) == 1 && (loserKingRegion & t)) {
The following line in semistatic.cpp is hard to read:
if (distance<Square>(s,t) == 1 && loserKingRegion & t) {
It's recommended to use parentheses to show evaluation precedence when using logical AND and bitwise AND in the same expression.
The code otherwise already follows this recommendation, like below in semistatic.cpp:
if ((visitors & s) && type_of(pos.piece_on(s)) != BISHOP)
As such I suggest to add parentheses in the expression as below:
if (distance<Square>(s,t) == 1 && (loserKingRegion & t)) {