mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user