X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fposition.h;h=e76844f6b1c07ffb9b244f1f446732566360b4e4;hb=2ff2b5972799c2cb1b68e2d82e35b9b3c7c6996d;hp=3da25b6f57e4c6e54b8e62af18c84e9717d385ee;hpb=5b2ac7590ccfe529698347981e45fdfa8a0a0780;p=stockfish diff --git a/src/position.h b/src/position.h index 3da25b6f..e76844f6 100644 --- a/src/position.h +++ b/src/position.h @@ -434,7 +434,7 @@ inline Square Position::initial_qr_square(Color c) const { template<> inline Bitboard Position::attacks_from(Square s, Color c) const { - return NonSlidingAttacksBB[piece_of_color_and_type(c, PAWN)][s]; + return NonSlidingAttacksBB[make_piece(c, PAWN)][s]; } template // Knight and King and white pawns @@ -490,7 +490,7 @@ inline Key Position::get_material_key() const { } inline Score Position::pst(Color c, PieceType pt, Square s) { - return PieceSquareTable[piece_of_color_and_type(c, pt)][s]; + return PieceSquareTable[make_piece(c, pt)][s]; } inline Score Position::pst_delta(Piece piece, Square from, Square to) { @@ -508,7 +508,7 @@ inline Value Position::non_pawn_material(Color c) const { inline bool Position::move_is_passed_pawn_push(Move m) const { Color c = side_to_move(); - return piece_on(move_from(m)) == piece_of_color_and_type(c, PAWN) + return piece_on(move_from(m)) == make_piece(c, PAWN) && pawn_is_passed(c, move_to(m)); }