From: Marco Costalba Date: Fri, 9 Oct 2009 10:29:11 +0000 (+0100) Subject: Small micro-optimization in get_pawn_info() X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=564ed5b38cb2b99e8770ed1c0ceee7c3e769eb0a;ds=sidebyside Small micro-optimization in get_pawn_info() No functional change. Signed-off-by: Marco Costalba --- diff --git a/src/pawns.cpp b/src/pawns.cpp index 8f5e1890..aa41c2cd 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -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(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(s, us) & theirPawns)) backward = false; else {