]> git.sesse.net Git - stockfish/blobdiff - src/pawns.cpp
Drop KILLER_MAX. Hardcode to 2 instead.
[stockfish] / src / pawns.cpp
index 8835d327e068b1e12215cfe754d3e17bcd641970..34c25959ab957e300a4857056f4ca5f23bc4efa2 100644 (file)
@@ -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)