diff --git a/src/json_reporter.cc b/src/json_reporter.cc index fe7b1be0..e5f3c352 100644 --- a/src/json_reporter.cc +++ b/src/json_reporter.cc @@ -92,7 +92,7 @@ std::string FormatKV(std::string const& key, double value) { return ss.str(); } -int64_t RoundDouble(double v) { return static_cast(v + 0.5); } +int64_t RoundDouble(double v) { return std::lround(v); } } // end namespace