From 288c7e96a2e23d6f0baa3640d9ab3ff44dc9cf05 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 29 Jan 2020 11:07:08 +0100 Subject: [PATCH] src/benchmark.cpp: fixing compiler conversion error by explicitly casting num_keys to float. --- src/benchmark.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/benchmark.cpp b/src/benchmark.cpp index b3f12da..6fb6c66 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -46,5 +46,5 @@ void benchmark(size_t num_keys, struct benchmark_result* res) { } res->sec = duration(steady_clock::now() - start).count(); - res->kps = num_keys / res->sec; + res->kps = static_cast(num_keys) / res->sec; }