From e444e18d2bd75454e3bbd9e5667b2357a19e5388 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Tue, 17 May 2011 12:24:06 +0200 Subject: [PATCH] Retire test for king moves in see() We already test this condition in see_sign() and so it is almost always a redundant verification. No functional change. Signed-off-by: Marco Costalba --- src/position.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/position.cpp b/src/position.cpp index ec4fa14e..a9c98626 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1519,11 +1519,6 @@ int Position::see(Move m) const { from = move_from(m); to = move_to(m); capturedType = type_of_piece_on(to); - - // King cannot be recaptured - if (capturedType == KING) - return seeValues[capturedType]; - occupied = occupied_squares(); // Handle en passant moves -- 2.39.2