Skip to content

Commit

Permalink
Small performance optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
yjf2002ghty committed May 4, 2024
1 parent 58f1e54 commit ce2c450
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/position.h
Original file line number Diff line number Diff line change
Expand Up @@ -671,11 +671,11 @@ inline Bitboard Position::drop_region(Color c, PieceType pt) const {
{
if (c == WHITE)
{
b &= var->whitePieceDropRegion.boardOfPiece(toupper(piece_to_char()[(c << PIECE_TYPE_BITS) + pt]));
b &= var->whitePieceDropRegion.boardOfPiece(toupper(piece_to_char()[(c << PIECE_TYPE_BITS) | pt]));
}
else if (c == BLACK)
{
b &= var->blackPieceDropRegion.boardOfPiece(toupper(piece_to_char()[(c << PIECE_TYPE_BITS) + pt]));
b &= var->blackPieceDropRegion.boardOfPiece(toupper(piece_to_char()[(c << PIECE_TYPE_BITS) | pt]));
}
}

Expand Down

0 comments on commit ce2c450

Please sign in to comment.