Remove global TB variables from search.cpp

Follow up cleanup of #4968, removes the global variables from search and
instead uses a dedicated tb config struct.

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

No functional change
This commit is contained in:
Disservin
2024-01-14 14:29:12 +01:00
parent 32e46fc47f
commit a5675f19d8
6 changed files with 89 additions and 75 deletions

View File

@@ -44,15 +44,13 @@ Bitboard BishopTable[0x1480]; // To store bishop attacks
void init_magics(PieceType pt, Bitboard table[], Magic magics[]);
}
// Returns the bitboard of target square for the given step
// from the given square. If the step is off the board, returns empty bitboard.
inline Bitboard safe_destination(Square s, int step) {
Bitboard safe_destination(Square s, int step) {
Square to = Square(s + step);
return is_ok(to) && distance(s, to) <= 2 ? square_bb(to) : Bitboard(0);
}
}
// Returns an ASCII representation of a bitboard suitable
// to be printed to standard output. Useful for debugging.