1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 00:33:09 +00:00

evaluate_passed_pawns() micro-optmization

No functional change, only a bit faster.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2009-01-06 16:06:08 +01:00
parent 90585a8a36
commit cbfbf25d1b

View file

@ -937,7 +937,7 @@ namespace {
ebonus += Value(square_distance(theirKingSq, blockSq) * 6 * tr); ebonus += Value(square_distance(theirKingSq, blockSq) * 6 * tr);
// If the pawn is free to advance, increase bonus // If the pawn is free to advance, increase bonus
if (pos.square_is_empty(blockSq)) if (tr != 0 && pos.square_is_empty(blockSq))
{ {
b2 = squares_in_front_of(us, s); b2 = squares_in_front_of(us, s);
b3 = b2 & ei.attacked_by(them); b3 = b2 & ei.attacked_by(them);