Small micro-optimization in get_pawn_info()
authorMarco Costalba <mcostalba@gmail.com>
Fri, 9 Oct 2009 10:29:11 +0000 (11:29 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 9 Oct 2009 10:29:11 +0000 (11:29 +0100)
No functional change.

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

index 8f5e18904f7503f5e9b81fd42fa6073e387b0de7..aa41c2cd8150b6baf86809d8e43832bacd7f2e25 100644 (file)
@@ -303,12 +303,11 @@ PawnInfo* PawnInfoTable::get_pawn_info(const Position& pos) {
         // it cannot be backward. If can capture an enemy pawn or if
         // there are friendly pawns behind on neighboring files it cannot
         // be backward either.
+
         bool backward;
-        if (   passed
-            || isolated
-            || chain
-            || (pos.attacks_from<PAWN>(s, us) & theirPawns)
-            || (ourPawns & behind_bb(us, r) & neighboring_files_bb(f)))
+        if (   (passed | isolated | chain)
+            || (ourPawns & behind_bb(us, r) & neighboring_files_bb(f))
+            || (pos.attacks_from<PAWN>(s, us) & theirPawns))
             backward = false;
         else
         {