Use unsigned type for intensity.

This commit is contained in:
XMRig 2019-08-17 05:22:09 +07:00
parent d254aafb93
commit bd9255136c
10 changed files with 27 additions and 29 deletions

View file

@ -166,18 +166,7 @@ namespace xmrig {
template<>
xmrig::IWorker *xmrig::Workers<CpuLaunchData>::create(Thread<CpuLaunchData> *handle)
{
const uint32_t intensity = static_cast<uint32_t>(handle->config().intensity);
# if defined(XMRIG_ALGO_RANDOMX) || defined(XMRIG_ALGO_CN_GPU)
if (intensity > handle->config().algorithm.maxIntensity()) {
LOG_WARN("CPU thread %zu warning: \"intensity %d not supported for %s algorithm\".", handle->index(), handle->config().intensity, handle->config().algorithm.shortName());
return new CpuWorker<1>(handle->index(), handle->config());
}
# endif
switch (intensity) {
switch (handle->config().intensity) {
case 1:
return new CpuWorker<1>(handle->index(), handle->config());