From 188700d7f15a778919ac65268adfee57c870dcda Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 29 Jan 2011 12:11:00 +0100 Subject: [PATCH] Retire obsolete reentrancy check in pos.print() We dont' call MovePicker from print() anymore, so that reentrancy check in now not needed. No functional change. Signed-off-by: Marco Costalba --- src/position.cpp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/position.cpp b/src/position.cpp index fc9ac124..1bae3620 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -17,11 +17,6 @@ along with this program. If not, see . */ - -//// -//// Includes -//// - #include #include #include @@ -32,7 +27,6 @@ #include "bitcount.h" #include "movegen.h" -#include "movepick.h" #include "position.h" #include "psqtab.h" #include "rkiss.h" @@ -43,11 +37,6 @@ using std::string; using std::cout; using std::endl; - -//// -//// Position's static data definitions -//// - Key Position::zobrist[2][8][64]; Key Position::zobEp[64]; Key Position::zobCastle[16]; @@ -402,14 +391,6 @@ const string Position::to_fen() const { void Position::print(Move move) const { const char* dottedLine = "\n+---+---+---+---+---+---+---+---+\n"; - static bool requestPending = false; - - // Check for reentrancy, as example when called from inside - // MovePicker that is used also here in move_to_san() - if (requestPending) - return; - - requestPending = true; if (move) { @@ -424,17 +405,16 @@ void Position::print(Move move) const { for (File file = FILE_A; file <= FILE_H; file++) { Square sq = make_square(file, rank); - char c = (color_of_piece_on(sq) == BLACK ? '=' : ' '); Piece piece = piece_on(sq); if (piece == PIECE_NONE && square_color(sq) == DARK) piece = PIECE_NONE_DARK_SQ; + char c = (color_of_piece_on(sq) == BLACK ? '=' : ' '); cout << c << pieceLetters.from_piece(piece) << c << '|'; } } cout << dottedLine << "Fen is: " << to_fen() << "\nKey is: " << st->key << endl; - requestPending = false; } -- 2.39.2