X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=2906b0453b3c8508ddeb3ce129a00152d9a5b1cd;hp=d5514e2eaea411e474e1802230ac1da2985ec95b;hb=c2d42ea8339b49e52a116e488214a14fda09d413;hpb=5c5af4fa6533e22fb56dd22985cf2b3938efde6c diff --git a/src/pawns.cpp b/src/pawns.cpp index d5514e2e..2906b045 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -72,14 +72,14 @@ namespace { } -/// PawnInfoTable::get_pawn_info() takes a position object as input, computes +/// PawnInfoTable::pawn_info() takes a position object as input, computes /// a PawnInfo object, and returns a pointer to it. The result is also stored /// in an hash table, so we don't have to recompute everything when the same /// pawn structure occurs again. -PawnInfo* PawnInfoTable::get_pawn_info(const Position& pos) const { +PawnInfo* PawnInfoTable::pawn_info(const Position& pos) const { - Key key = pos.get_pawn_key(); + Key key = pos.pawn_key(); PawnInfo* pi = probe(key); // If pi->key matches the position's pawn hash key, it means that we @@ -182,7 +182,7 @@ Score PawnInfoTable::evaluate_pawns(const Position& pos, Bitboard ourPawns, // pawn on neighboring files is higher or equal than the number of // enemy pawns in the forward direction on the neighboring files. candidate = !(opposed | passed | backward | isolated) - && (b = attack_span_mask(Them, s + pawn_push(Us)) & ourPawns) != EmptyBoardBB + && (b = attack_span_mask(Them, s + pawn_push(Us)) & ourPawns) != 0 && count_1s(b) >= count_1s(attack_span_mask(Us, s) & theirPawns); // Passed pawns will be properly scored in evaluation because we need