X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=7906eb7535631c2bcb8ea6c5398eb82d8e37ed02;hp=7b2479fca6135574ec5aa0c645afb34532849d2b;hb=c1b60269a26b2ba1c8882b8f382f0e3e435c1962;hpb=bafb9f1a25204d06960a44f0637736edce233629 diff --git a/src/movepick.cpp b/src/movepick.cpp index 7b2479fc..7906eb75 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -63,13 +63,19 @@ namespace { /// search captures, promotions and some checks) and about how important good /// move ordering is at the current node. -MovePicker::MovePicker(const Position& p, bool pv, Move ttm, - const SearchStack& ss, Depth d) : pos(p) { +MovePicker::MovePicker(const Position& p, bool pv, Move ttm, Depth d, + const History& h, SearchStack* ss) : pos(p), H(h) { + pvNode = pv; ttMove = ttm; - mateKiller = (ss.mateKiller == ttm)? MOVE_NONE : ss.mateKiller; - killer1 = ss.killers[0]; - killer2 = ss.killers[1]; + if (ss) + { + mateKiller = (ss->mateKiller == ttm)? MOVE_NONE : ss->mateKiller; + killer1 = ss->killers[0]; + killer2 = ss->killers[1]; + } else + mateKiller = killer1 = killer2 = MOVE_NONE; + depth = d; movesPicked = 0; numOfMoves = 0;