From 564ed5b38cb2b99e8770ed1c0ceee7c3e769eb0a Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Fri, 9 Oct 2009 11:29:11 +0100 Subject: [PATCH] Small micro-optimization in get_pawn_info() No functional change. Signed-off-by: Marco Costalba --- src/pawns.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 { -- 2.39.2