mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 10:57:43 +00:00
Introduce single_bit() helper
Self-documenting code instead of a tricky bitwise tweak, not known by everybody. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
+1
-1
@@ -517,7 +517,7 @@ namespace {
|
||||
|
||||
assert(b);
|
||||
|
||||
if (!(b & (b - 1)) && (b & pos.pieces(Them)))
|
||||
if (single_bit(b) && (b & pos.pieces(Them)))
|
||||
score += ThreatBonus[Piece][type_of(pos.piece_on(first_1(b)))] / 2;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user