]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Spread usage of pos.piece_moved()
[stockfish] / src / search.cpp
index d4826946fb043b98b5e8ec4cc2d77d1e0e5315d8..28e231dd98a0811529b165e14b1671e3d6e47fae 100644 (file)
@@ -1343,7 +1343,7 @@ split_point_start: // At split points actual search starts from here
     them = ~pos.side_to_move();
     ksq = pos.king_square(them);
     kingAtt = pos.attacks_from<KING>(ksq);
-    pc = pos.piece_on(from);
+    pc = pos.piece_moved(move);
 
     occ = pos.occupied_squares() & ~(1ULL << from) & ~(1ULL << ksq);
     oldAtt = pos.attacks_from(pc, from, occ);
@@ -1865,7 +1865,7 @@ void Thread::idle_loop(SplitPoint* sp_master) {
           lock_grab(Threads.splitLock);
 
           assert(is_searching);
-          SplitPoint* sp = splitPoint;
+          SplitPoint* sp = curSplitPoint;
 
           lock_release(Threads.splitLock);
 
@@ -1906,9 +1906,6 @@ void Thread::idle_loop(SplitPoint* sp_master) {
               Threads[master].wake_up();
       }
   }
-  // In helpful master concept a master can help only a sub-tree of its split
-  // point, and because here is all finished is not possible master is booked.
-  assert(!is_searching);
 }