X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=18c520f15fd71aebec2becbe72463612b5d84df0;hp=67693a38986dc1f93cdd285bc6244c8ec00f0e27;hb=e74c2df907d5336d3d2b8ee7748b82270ebbf337;hpb=7ff965eebfbc17d2bb4be9c64d56fecf68615010 diff --git a/src/search.cpp b/src/search.cpp index 67693a38..18c520f1 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1583,7 +1583,6 @@ void Thread::idle_loop() { // Try to late join to another split point if none of its slaves has // already finished. SplitPoint* bestSp = NULL; - Thread* bestThread = NULL; int bestScore = INT_MAX; for (Thread* th : Threads) @@ -1611,7 +1610,6 @@ void Thread::idle_loop() { if (score < bestScore) { bestSp = sp; - bestThread = th; bestScore = score; } } @@ -1627,7 +1625,7 @@ void Thread::idle_loop() { if ( sp->allSlavesSearching && sp->slavesMask.count() < MAX_SLAVES_PER_SPLITPOINT - && available_to(bestThread)) + && available_to(sp->master)) { sp->slavesMask.set(idx); activeSplitPoint = sp;