Fix Visual Studio warnings.

This commit is contained in:
XMRig 2017-08-14 09:30:41 +03:00
parent 9975b4e4cd
commit a07b0e5953
21 changed files with 43 additions and 39 deletions

View file

@ -68,7 +68,7 @@ int Cpu::optimalThreadsCount(int algo, bool doubleHash, int maxCpuUsage)
}
if (((float) count / m_totalThreads * 100) > maxCpuUsage) {
count = ceil((float) m_totalThreads * (maxCpuUsage / 100.0));
count = (int) ceil((float) m_totalThreads * (maxCpuUsage / 100.0));
}
return count < 1 ? 1 : count;