]> git.sesse.net Git - stockfish/commitdiff
Retire test for king moves in see()
authorMarco Costalba <mcostalba@gmail.com>
Tue, 17 May 2011 10:24:06 +0000 (12:24 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 17 May 2011 11:25:49 +0000 (12:25 +0100)
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 <mcostalba@gmail.com>
src/position.cpp

index ec4fa14e8692fc5cddcd0dc026358625f7821d7d..a9c98626980fa56bbf5995e2c0d186f342fddef2 100644 (file)
@@ -1519,11 +1519,6 @@ int Position::see(Move m) const {
   from = move_from(m);
   to = move_to(m);
   capturedType = type_of_piece_on(to);
   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
   occupied = occupied_squares();
 
   // Handle en passant moves