]> git.sesse.net Git - stockfish/blobdiff - src/movepick.cpp
Fix an assert in SMP case
[stockfish] / src / movepick.cpp
index e2428554249c7a81e6cb6641ff2769715e11745f..c4eaa902e292e64cdea5858f4f9ae3318f07ec92 100644 (file)
@@ -140,6 +140,15 @@ MovePicker::MovePicker(const Position& p, Move ttm, const HistoryStats& h, Piece
 }
 
 
+/// quiet_moves() returns a pointer to the beginning of moves array. It
+/// is used to access already tried quiet moves when updating history.
+
+const ExtMove* MovePicker::quiet_moves() const {
+  return  stage == KILLERS_S1 ? killers
+        : stage == QUIETS_1_S1 || stage == QUIETS_2_S1 ? moves : NULL;
+}
+
+
 /// score() assign a numerical move ordering score to each move in a move list.
 /// The moves with highest scores will be picked first.
 template<>
@@ -299,7 +308,7 @@ Move MovePicker::next_move<false>() {
       switch (stage) {
 
       case MAIN_SEARCH: case EVASION: case QSEARCH_0: case QSEARCH_1: case PROBCUT:
-          cur++;
+          ++cur;
           return ttMove;
 
       case CAPTURES_S1: