]> git.sesse.net Git - stockfish/commitdiff
Remove a redundant check in passed pawn eval
authorMarco Costalba <mcostalba@gmail.com>
Tue, 29 Jun 2010 11:05:19 +0000 (13:05 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 29 Jun 2010 17:35:54 +0000 (18:35 +0100)
When first condition is met then second one is
always true.

Spotted by Ralph Stoesser.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/evaluate.cpp

index d291e46b6c8c21c7816952adf89c311874cbcbc5..7fd0db57dc668c37b330c77a51d4561957509f36 100644 (file)
@@ -861,8 +861,7 @@ namespace {
         // value if the other side has a rook or queen.
         if (square_file(s) == FILE_A || square_file(s) == FILE_H)
         {
-            if (   pos.non_pawn_material(Them) <= KnightValueMidgame
-                && pos.piece_count(Them, KNIGHT) <= 1)
+            if (pos.non_pawn_material(Them) <= KnightValueMidgame)
                 ebonus += ebonus / 4;
             else if (pos.pieces(ROOK, QUEEN, Them))
                 ebonus -= ebonus / 4;