Retire Position::type_of_piece_on()

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-06-26 10:28:54 +01:00
parent 351ef5c85b
commit a9782b94e6
6 changed files with 19 additions and 24 deletions

View 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;