From b9d4e6f7fd238edffd91ebbf4b944cddcd65a955 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Thu, 19 Feb 2015 10:18:24 +0100 Subject: [PATCH] Fix a warning under MSVC Assignment of size_t to int. No functional change. --- src/search.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index b1eac341..76d0350c 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1589,7 +1589,7 @@ void Thread::idle_loop() { // Try to late join to another split point if none of its slaves has // already finished. SplitPoint* bestSp = NULL; - int bestThread = 0; + Thread* bestThread = NULL; int bestScore = INT_MAX; for (size_t i = 0; i < Threads.size(); ++i) @@ -1615,7 +1615,7 @@ void Thread::idle_loop() { if (score < bestScore) { bestSp = sp; - bestThread = i; + bestThread = Threads[i]; bestScore = score; } } @@ -1631,7 +1631,7 @@ void Thread::idle_loop() { if ( sp->allSlavesSearching && sp->slavesCount < MAX_SLAVES_PER_SPLITPOINT - && available_to(Threads[bestThread])) + && available_to(bestThread)) { sp->slavesMask.set(idx); sp->slavesCount++; -- 2.39.2