X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=797f5e9497ab14e6d142a0bad75b560914f6018a;hp=7b2479fca6135574ec5aa0c645afb34532849d2b;hb=e1ed67aacbe7fb4b462b9141d3137bed0a3ea70b;hpb=5b1316f7bbb259b87cecc276e4a1ce78b1a0e51b diff --git a/src/movepick.cpp b/src/movepick.cpp index 7b2479fc..797f5e94 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -63,13 +63,18 @@ 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, SearchStack* ss) : pos(p) { + 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;