1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

Bug fix for MSVC Error

error C2440: cannot convert from 'double' to 'Depth'

No functional change.
This commit is contained in:
mstembera 2015-10-09 14:28:25 -07:00 committed by Marco Costalba
parent a129fa8ee3
commit e854b30c84

View file

@ -385,11 +385,11 @@ void Thread::search(bool isMainThread) {
++depth;
for (Thread* th : Threads)
if (th != this && th->depth <= depth)
th->depth = depth + Depth(3 * log(1 + th->idx));
th->depth = depth + Depth(int(3 * log(1 + th->idx)));
}
else
// This can cause a thread to search with the same depth for many iterations
depth = Threads.main()->depth + Depth(3 * log(1 + this->idx));
depth = Threads.main()->depth + Depth(int(3 * log(1 + this->idx)));
if (depth >= DEPTH_MAX || Signals.stop || (Limits.depth && depth > Limits.depth))
break;