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

Improve update_killers() signature

Will be used by future patches and is cleaner.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2011-01-06 09:09:53 +01:00
parent d4ded09e17
commit c14dae1fa2

View file

@ -304,7 +304,7 @@ namespace {
bool connected_threat(const Position& pos, Move m, Move threat); bool connected_threat(const Position& pos, Move m, Move threat);
Value refine_eval(const TTEntry* tte, Value defaultEval, int ply); Value refine_eval(const TTEntry* tte, Value defaultEval, int ply);
void update_history(const Position& pos, Move move, Depth depth, Move movesSearched[], int moveCount); void update_history(const Position& pos, Move move, Depth depth, Move movesSearched[], int moveCount);
void update_killers(Move m, SearchStack* ss); void update_killers(Move m, Move killers[]);
void update_gains(const Position& pos, Move move, Value before, Value after); void update_gains(const Position& pos, Move move, Value before, Value after);
int current_search_time(); int current_search_time();
@ -830,7 +830,7 @@ namespace {
if (!pos.move_is_capture_or_promotion(move)) if (!pos.move_is_capture_or_promotion(move))
{ {
update_history(pos, move, depth, movesSearched, moveCount); update_history(pos, move, depth, movesSearched, moveCount);
update_killers(move, ss); update_killers(move, ss->killers);
} }
// Inform GUI that PV has changed // Inform GUI that PV has changed
@ -1398,7 +1398,7 @@ split_point_start: // At split points actual search starts from here
&& !pos.move_is_capture_or_promotion(move)) && !pos.move_is_capture_or_promotion(move))
{ {
update_history(pos, move, depth, movesSearched, moveCount); update_history(pos, move, depth, movesSearched, moveCount);
update_killers(move, ss); update_killers(move, ss->killers);
} }
} }
@ -1917,13 +1917,13 @@ split_point_start: // At split points actual search starts from here
// update_killers() add a good move that produced a beta-cutoff // update_killers() add a good move that produced a beta-cutoff
// among the killer moves of that ply. // among the killer moves of that ply.
void update_killers(Move m, SearchStack* ss) { void update_killers(Move m, Move killers[]) {
if (m == ss->killers[0]) if (m == killers[0])
return; return;
ss->killers[1] = ss->killers[0]; killers[1] = killers[0];
ss->killers[0] = m; killers[0] = m;
} }