Skip to content

Commit

Permalink
Allow integer algo-perf values
Browse files Browse the repository at this point in the history
  • Loading branch information
MoneroOcean committed Aug 8, 2018
1 parent bd56b88 commit 143bd19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,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());
}
}
}
Expand Down

0 comments on commit 143bd19

Please sign in to comment.