]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Retire Position::type_of_piece_on()
[stockfish] / src / search.cpp
index 81f96ccdc74162d7ac63e1b37eece83b23ad9a60..9244ce3dc7bbb8d13402ec25171498229f514216 100644 (file)
@@ -300,7 +300,7 @@ namespace {
     if (moveIsCheck && pos.see_sign(m) >= 0)
         result += CheckExtension[PvNode];
 
-    if (pos.type_of_piece_on(move_from(m)) == PAWN)
+    if (type_of_piece(pos.piece_on(move_from(m))) == PAWN)
     {
         Color c = pos.side_to_move();
         if (relative_rank(c, move_to(m)) == RANK_7)
@@ -316,7 +316,7 @@ namespace {
     }
 
     if (   captureOrPromotion
-        && pos.type_of_piece_on(move_to(m)) != PAWN
+        && type_of_piece(pos.piece_on(move_to(m))) != PAWN
         && (  pos.non_pawn_material(WHITE) + pos.non_pawn_material(BLACK)
             - piece_value_midgame(pos.piece_on(move_to(m))) == VALUE_ZERO)
         && !move_is_special(m))
@@ -1666,7 +1666,7 @@ split_point_start: // At split points actual search starts from here
     // value of the threatening piece, don't prune moves which defend it.
     if (   pos.move_is_capture(threat)
         && (   piece_value_midgame(pos.piece_on(tfrom)) >= piece_value_midgame(pos.piece_on(tto))
-            || pos.type_of_piece_on(tfrom) == KING)
+            || type_of_piece(pos.piece_on(tfrom)) == KING)
         && pos.move_attacks_square(m, tto))
         return true;