X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=7b7ad2d5885abcde549c1a8b061cb132974645b5;hp=9b00b2b7d94ac244e3126909be1ae5fe6340b1b7;hb=803c8e0be3de7357a27c5fcd6c5580f5399e8389;hpb=dadf6a6fe9874fa2efb91f14b5b6456fdd8483b2 diff --git a/src/search.cpp b/src/search.cpp index 9b00b2b7..7b7ad2d5 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -304,7 +304,7 @@ namespace { bool connected_threat(const Position& pos, Move m, Move threat); 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_killers(Move m, SearchStack* ss); + void update_killers(Move m, Move killers[]); void update_gains(const Position& pos, Move move, Value before, Value after); int current_search_time(); @@ -830,7 +830,7 @@ namespace { if (!pos.move_is_capture_or_promotion(move)) { update_history(pos, move, depth, movesSearched, moveCount); - update_killers(move, ss); + update_killers(move, ss->killers); } // 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)) { 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 // 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; - ss->killers[1] = ss->killers[0]; - ss->killers[0] = m; + killers[1] = killers[0]; + killers[0] = m; }