From b4300bf40c1134231af48cab4f38c5394976d9a1 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 3 Apr 2025 14:52:19 +1100 Subject: Turn on type conversion warnings for GCC and fix them. --- src/Document.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Document.cxx') diff --git a/src/Document.cxx b/src/Document.cxx index ddcf43276..8f6806824 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -120,7 +120,7 @@ void ActionDuration::AddSample(size_t numberActions, double durationOfActions) n // Most recent value contributes 25% to smoothed value. constexpr double alpha = 0.25; - const double durationOne = durationOfActions / numberActions; + const double durationOne = durationOfActions / static_cast(numberActions); duration = std::clamp(alpha * durationOne + (1.0 - alpha) * duration, minDuration, maxDuration); } -- cgit v1.2.3