1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-12 01:42:48 -05:00
This commit is contained in:
MoneroOcean
2018-08-14 11:01:08 +02:00

View File

@@ -345,7 +345,9 @@ void xmrig::Config::parseJSON(const rapidjson::Document &doc)
const xmrig::PerfAlgo pa = static_cast<xmrig::PerfAlgo>(a); const xmrig::PerfAlgo pa = static_cast<xmrig::PerfAlgo>(a);
const rapidjson::Value &key = algo_perf[xmrig::Algorithm::perfAlgoName(pa)]; const rapidjson::Value &key = algo_perf[xmrig::Algorithm::perfAlgoName(pa)];
if (key.IsDouble()) { 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());
} }
} }
} }