catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Fix implicit long to double conversion
- Commit
d0177ee68607e7298869807bfcd20c080512185f- Author
- Joe Noël ·
- Committer
- Martin Hořeňovský
- Parents
173539ab9e50
Changes
src/catch2/benchmark/detail/catch_stats.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/catch2/benchmark/detail/catch_stats.hpp b/src/catch2/benchmark/detail/catch_stats.hpp index db93fa29..bfeace2c 100644 --- a/src/catch2/benchmark/detail/catch_stats.hpp +++ b/src/catch2/benchmark/detail/catch_stats.hpp @@ -115,7 +115,7 @@ namespace Catch { double z1 = normal_quantile((1. - confidence_level) / 2.); auto cumn = [n]( double x ) -> long { - return std::lround( normal_cdf( x ) * n ); + return std::lround( normal_cdf( x ) * static_cast<double>(n) ); }; auto a = [bias, accel](double b) { return bias + b / (1. - accel * b); }; double b1 = bias + z1;