]> git.sesse.net Git - stockfish/commitdiff
Avoid explicit bitwise operators
authorReuven Peleg <reuvenpe2005@gmail.com>
Sun, 5 May 2013 19:39:06 +0000 (22:39 +0300)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 5 May 2013 20:51:18 +0000 (22:51 +0200)
No functional change.

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

index fe4eef57493c8ed3a601120dc7fee3233e7a1b5d..854ab42a1c3c132899e54dddd315653f2e60d11f 100644 (file)
@@ -677,8 +677,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
     Score score = SCORE_ZERO;
 
     // Undefended minors get penalized even if not under attack
     Score score = SCORE_ZERO;
 
     // Undefended minors get penalized even if not under attack
-    undefendedMinors =  pos.pieces(Them)
-                      & (pos.pieces(BISHOP) | pos.pieces(KNIGHT))
+    undefendedMinors =  pos.pieces(Them, BISHOP, KNIGHT)
                       & ~ei.attackedBy[Them][ALL_PIECES];
 
     if (undefendedMinors)
                       & ~ei.attackedBy[Them][ALL_PIECES];
 
     if (undefendedMinors)