From 6947d6c6282448bb2605f59ed92b8562a6f59e95 Mon Sep 17 00:00:00 2001 From: Maarten Arnst Date: Fri, 24 May 2024 13:09:30 +0200 Subject: [PATCH] Static cast to avoid conversion warning --- src/benchmark_runner.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/benchmark_runner.cc b/src/benchmark_runner.cc index cb8dbc8e3e..84d5dfc5e2 100644 --- a/src/benchmark_runner.cc +++ b/src/benchmark_runner.cc @@ -371,9 +371,7 @@ double BenchmarkRunner::GetMinTimeToApply() const { } double BenchmarkRunner::GetRelAccuracy(const IterationResults& i) const { - return std::sqrt(i.seconds_pow2 / i.iters - - std::pow(i.seconds / i.iters, 2.)) / - (i.seconds / i.iters) / sqrt(i.iters); + return std::sqrt(it_res.seconds_pow2 - std::pow(i.seconds, 2.) / static_cast(i.iters)) / i.seconds; } bool BenchmarkRunner::HasSufficientTimeToApply(