From 13bb0f14e16325d0644fcc104cdde552e562f786 Mon Sep 17 00:00:00 2001 From: MoneroOcean Date: Sun, 15 Aug 2021 04:41:24 +0000 Subject: [PATCH] Merge xmrig v6.14.1 into master --- src/core/MoBenchmark.cpp | 4 ++-- src/core/MoBenchmark.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/MoBenchmark.cpp b/src/core/MoBenchmark.cpp index 8974df08..b4e4c69c 100644 --- a/src/core/MoBenchmark.cpp +++ b/src/core/MoBenchmark.cpp @@ -58,7 +58,7 @@ void MoBenchmark::start() { // end of benchmarks, switch to jobs from the pool (network), fill algo_perf void MoBenchmark::finish() { - for (const Id algo : Algorithm::all([this](const Algorithm &algo) { return true; })) { + for (const Algorithm::Id algo : Algorithm::all([this](const Algorithm &algo) { return true; })) { algo_perf[algo] = get_algo_perf(algo); } m_bench_algo = BenchAlgo::INVALID; @@ -86,7 +86,7 @@ rapidjson::Value MoBenchmark::toJSON(rapidjson::Document &doc) const void MoBenchmark::read(const rapidjson::Value &value) { - for (const Id algo : Algorithm::all([this](const Algorithm &algo) { return true; })) { + for (const Algorithm::Id algo : Algorithm::all([this](const Algorithm&) { return true; })) { algo_perf[algo] = 0.0f; } if (value.IsObject()) { diff --git a/src/core/MoBenchmark.h b/src/core/MoBenchmark.h index 12f9583e..d1b83c25 100644 --- a/src/core/MoBenchmark.h +++ b/src/core/MoBenchmark.h @@ -96,7 +96,7 @@ class MoBenchmark : public IJobResultListener { void start(); // start benchmarks bool isNewBenchRun() const { return m_isNewBenchRun; } - std::map algo_perf; + mutable std::map algo_perf; rapidjson::Value toJSON(rapidjson::Document &doc) const; void read(const rapidjson::Value &value);