Allow integer algo-perf values

This commit is contained in:
MoneroOcean 2018-08-08 21:42:52 +02:00
parent 9b796b4b8a
commit d9d720eed2

View file

@ -346,7 +346,9 @@ void xmrig::Config::parseJSON(const rapidjson::Document &doc)
const xmrig::PerfAlgo pa = static_cast<xmrig::PerfAlgo>(a);
const rapidjson::Value &key = algo_perf[xmrig::Algorithm::perfAlgoName(pa)];
if (key.IsDouble()) {
m_algo_perf[pa] = key.GetDouble();
m_algo_perf[pa] = static_cast<float>(key.GetDouble());
} else if (key.IsInt()) {
m_algo_perf[pa] = static_cast<float>(key.GetInt());
}
}
}