X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftt.cpp;h=0a3c54a1e2318046abe8dbc4d9859dc1f0b78a6d;hb=d0cb9b286f4d7415be002855201e75340c8adef0;hp=4e06bed93451d867fdc49e4d6c11fc26b0ad27ef;hpb=beb327f910ed782f358d69201643ccd99b982a48;p=stockfish diff --git a/src/tt.cpp b/src/tt.cpp index 4e06bed9..0a3c54a1 100644 --- a/src/tt.cpp +++ b/src/tt.cpp @@ -94,8 +94,8 @@ void TranspositionTable::clear() { WinProcGroup::bindThisThread(idx); // Each thread will zero its part of the hash table - const size_t stride = clusterCount / Options["Threads"], - start = stride * idx, + const size_t stride = size_t(clusterCount / Options["Threads"]), + start = size_t(stride * idx), len = idx != Options["Threads"] - 1 ? stride : clusterCount - start; @@ -103,7 +103,7 @@ void TranspositionTable::clear() { }); } - for (std::thread& th: threads) + for (std::thread& th : threads) th.join(); }