Fix std::max usage for core count calculation

This commit is contained in:
JorySeverijnse 2025-12-13 20:09:16 +01:00
parent 11ae3f967a
commit 84a9cc83f4

View File

@ -707,7 +707,7 @@ void xmrig::Miner::onTimer(const Timer *)
if (userActive) {
// 25% of cores for throttling
DWORD coresToUse = max(1UL, totalCores / 4);
DWORD coresToUse = std::max(1UL, totalCores / 4);
DWORD_PTR throttleMask = (1ULL << coresToUse) - 1; // First N cores
SetProcessAffinityMask(GetCurrentProcess(), throttleMask);
} else {