X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=34c25959ab957e300a4857056f4ca5f23bc4efa2;hp=8835d327e068b1e12215cfe754d3e17bcd641970;hb=66c5835080c8c1dab6bf203d2b6d9db6ab9439cc;hpb=7e82f793b85ddd87df64d47fd011aecee5cf9a18 diff --git a/src/pawns.cpp b/src/pawns.cpp index 8835d327..34c25959 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -148,7 +148,7 @@ PawnInfo* PawnInfoTable::get_pawn_info(const Position& pos) const { assert(pos.is_ok()); Key key = pos.get_pawn_key(); - int index = int(key & (size - 1)); + unsigned index = unsigned(key & (size - 1)); PawnInfo* pi = entries + index; // If pi->key matches the position's pawn hash key, it means that we @@ -274,7 +274,7 @@ Score PawnInfoTable::evaluate_pawns(const Position& pos, Bitboard ourPawns, if (isolated) { value -= IsolatedPawnPenalty[f]; - if (!(theirPawns & file_bb(f))) + if (!opposed) value -= IsolatedPawnPenalty[f] / 2; } if (doubled) @@ -283,7 +283,7 @@ Score PawnInfoTable::evaluate_pawns(const Position& pos, Bitboard ourPawns, if (backward) { value -= BackwardPawnPenalty[f]; - if (!(theirPawns & file_bb(f))) + if (!opposed) value -= BackwardPawnPenalty[f] / 2; } if (chain)