mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Remove redundant argument in think()
We don't need to pass side_to_move because we can get it directly from the position object. Note that in benchmark we always used to pass '0' and it was a bug, but with no effect because was used only in time[] and increment[], set always to 0 for both colors. Also additional small cleanup while there. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -1064,9 +1064,8 @@ namespace {
|
||||
}
|
||||
|
||||
|
||||
// scale_by_game_phase() interpolates between a middle game and an endgame
|
||||
// score, based on game phase. It also scales the return value by a
|
||||
// ScaleFactor array.
|
||||
// scale_by_game_phase() interpolates between a middle game and an endgame score,
|
||||
// based on game phase. It also scales the return value by a ScaleFactor array.
|
||||
|
||||
Value scale_by_game_phase(const Score& v, Phase ph, const ScaleFactor sf[]) {
|
||||
|
||||
@@ -1076,7 +1075,7 @@ namespace {
|
||||
|
||||
Value eg = eg_value(v);
|
||||
ScaleFactor f = sf[eg > Value(0) ? WHITE : BLACK];
|
||||
Value ev = Value((eg * f) / int(SCALE_FACTOR_NORMAL));
|
||||
Value ev = Value((eg * f) / SCALE_FACTOR_NORMAL);
|
||||
|
||||
int result = (mg_value(v) * ph + ev * (128 - ph)) / 128;
|
||||
return Value(result & ~(GrainSize - 1));
|
||||
|
||||
Reference in New Issue
Block a user