From 6a4f817693d51b38b70b8a7290d005f5c1ae900b Mon Sep 17 00:00:00 2001 From: XMRig Date: Tue, 8 May 2018 06:19:10 +0700 Subject: [PATCH] #615 Fixed build without libcpuid. --- src/Cpu_stub.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Cpu_stub.cpp b/src/Cpu_stub.cpp index 87d9de75..8b27ad65 100644 --- a/src/Cpu_stub.cpp +++ b/src/Cpu_stub.cpp @@ -4,8 +4,8 @@ * Copyright 2014 Lucas Jones * Copyright 2014-2016 Wolf9466 * Copyright 2016 Jay D Dee - * Copyright 2016-2017 XMRig - * + * Copyright 2017-2018 XMR-Stak , + * Copyright 2016-2018 XMRig , * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -110,12 +110,12 @@ int Cpu::m_l2_cache = 0; int Cpu::m_l3_cache = 0; int Cpu::m_sockets = 1; int Cpu::m_totalCores = 0; -int Cpu::m_totalThreads = 0; +size_t Cpu::m_totalThreads = 0; -int Cpu::optimalThreadsCount(int algo, bool doubleHash, int maxCpuUsage) +size_t Cpu::optimalThreadsCount(size_t size, int maxCpuUsage) { - int count = m_totalThreads / 2; + const size_t count = m_totalThreads / 2; return count < 1 ? 1 : count; }