Skip to content

Commit

Permalink
Merge pull request #76 from Spudz76/ocean-master-fixAPIConfigCrash
Browse files Browse the repository at this point in the history
Fix for crash when sending config via API
  • Loading branch information
MoneroOcean committed Oct 25, 2021
2 parents 5aebdb8 + 53e2715 commit cf10b0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/MoBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ rapidjson::Value MoBenchmark::toJSON(rapidjson::Document &doc) const

Value obj(kObjectType);

for (const auto &a : m_controller->miner()->algorithms()) {
for (const Algorithm a : Algorithm::all()) {
if (algo_perf[a.id()] == 0.0f) continue;
obj.AddMember(StringRef(a.name()), algo_perf[a.id()], allocator);
}
Expand All @@ -86,7 +86,7 @@ rapidjson::Value MoBenchmark::toJSON(rapidjson::Document &doc) const

void MoBenchmark::read(const rapidjson::Value &value)
{
for (const Algorithm::Id algo : Algorithm::all([this](const Algorithm&) { return true; })) {
for (const Algorithm::Id algo : Algorithm::all()) {
algo_perf[algo] = 0.0f;
}
if (value.IsObject()) {
Expand Down

0 comments on commit cf10b0c

Please sign in to comment.