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

Remove an useless Max() in passed pawns evaluation

There is no reason for that since tr cannot become negative.

Spotted by Ralph Stoesser.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2010-05-16 00:56:05 +01:00
parent 6c0b2f5003
commit 8b6bcd9731

View file

@ -799,7 +799,7 @@ namespace {
assert(pos.pawn_is_passed(Us, s));
int r = int(relative_rank(Us, s) - RANK_2);
int tr = Max(0, r * (r - 1));
int tr = r * (r - 1);
// Base bonus based on rank
Value mbonus = Value(20 * tr);