Various cleanups

Various simplifications, cleanups, consistancy improvements, and warning
mitigations.

Passed Non-Regression STC:
https://tests.stockfishchess.org/tests/view/67e7dd2d6682f97da2178fd8
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 386848 W: 99593 L: 99751 D: 187504
Ptnml(0-2): 1024, 41822, 107973, 41498, 1107

closes https://github.com/official-stockfish/Stockfish/pull/5948

No functional change
This commit is contained in:
mstembera
2025-04-02 17:43:14 +02:00
committed by Disservin
parent 1a395f1b56
commit ed89817f62
8 changed files with 33 additions and 41 deletions
+3 -4
View File
@@ -54,8 +54,8 @@ namespace {
constexpr std::string_view PieceToChar(" PNBRQK pnbrqk");
constexpr Piece Pieces[] = {W_PAWN, W_KNIGHT, W_BISHOP, W_ROOK, W_QUEEN, W_KING,
B_PAWN, B_KNIGHT, B_BISHOP, B_ROOK, B_QUEEN, B_KING};
static constexpr Piece Pieces[] = {W_PAWN, W_KNIGHT, W_BISHOP, W_ROOK, W_QUEEN, W_KING,
B_PAWN, B_KNIGHT, B_BISHOP, B_ROOK, B_QUEEN, B_KING};
} // namespace
@@ -733,8 +733,7 @@ DirtyPiece Position::do_move(Move m,
st->nonPawnKey[us] ^= Zobrist::psq[captured][rfrom] ^ Zobrist::psq[captured][rto];
captured = NO_PIECE;
}
if (captured)
else if (captured)
{
Square capsq = to;