@@ -179,7 +179,7 @@ namespace {
179179 S ( 9 , 10 ), S ( 2 , 10 ), S ( 1 , -8 ), S (-20 ,-12 ),
180180 S (-20 ,-12 ), S ( 1 , -8 ), S ( 2 , 10 ), S ( 9 , 10 )
181181 };
182-
182+
183183 // Protector[PieceType-2][distance] contains a protecting bonus for our king,
184184 // indexed by piece type and distance between the piece and the king.
185185 const Score Protector[4 ][8 ] = {
@@ -302,7 +302,7 @@ namespace {
302302 int mob = popcount (b & ei.mobilityArea [Us]);
303303
304304 mobility[Us] += MobilityBonus[Pt-2 ][mob];
305-
305+
306306 // Bonus for this piece as a king protector
307307 score += Protector[Pt-2 ][distance (s, pos.square <KING>(Us))];
308308
@@ -740,7 +740,7 @@ namespace {
740740
741741 int kingDistance = distance<File>(pos.square <KING>(WHITE), pos.square <KING>(BLACK))
742742 - distance<Rank>(pos.square <KING>(WHITE), pos.square <KING>(BLACK));
743- int pawns = pos.count <PAWN>(WHITE) + pos. count <PAWN>(BLACK );
743+ int pawns = pos.count <PAWN>();
744744 bool bothFlanks = (pos.pieces (PAWN) & QueenSide) && (pos.pieces (PAWN) & KingSide);
745745
746746 // Compute the initiative bonus for the attacking side
@@ -847,7 +847,7 @@ Value Eval::evaluate(const Position& pos) {
847847 - evaluate_passer_pawns<BLACK, DoTrace>(pos, ei);
848848
849849 // Evaluate space for both sides, only during opening
850- if (pos.non_pawn_material (WHITE) + pos. non_pawn_material (BLACK ) >= 12222 )
850+ if (pos.non_pawn_material () >= 12222 )
851851 score += evaluate_space<WHITE>(pos, ei)
852852 - evaluate_space<BLACK>(pos, ei);
853853
@@ -870,7 +870,7 @@ Value Eval::evaluate(const Position& pos) {
870870 Trace::add (IMBALANCE, ei.me ->imbalance ());
871871 Trace::add (PAWN, ei.pe ->pawns_score ());
872872 Trace::add (MOBILITY, mobility[WHITE], mobility[BLACK]);
873- if (pos.non_pawn_material (WHITE) + pos. non_pawn_material (BLACK ) >= 12222 )
873+ if (pos.non_pawn_material () >= 12222 )
874874 Trace::add (SPACE, evaluate_space<WHITE>(pos, ei)
875875 , evaluate_space<BLACK>(pos, ei));
876876 Trace::add (TOTAL, score);
0 commit comments