From ba84d2d37253c89b17b2cb7b357e130093b79ef5 Mon Sep 17 00:00:00 2001 From: Simon <42865234+SimonMaracine@users.noreply.github.com> Date: Fri, 27 Feb 2026 14:48:30 +0200 Subject: [PATCH] Fixed -Wconversion warnings in GCC. (#9265) --- imgui_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_internal.h b/imgui_internal.h index 9fe84ddb4..0d229e6c2 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -534,7 +534,7 @@ inline float ImLinearSweep(float current, float target, float speed) { if (cu inline float ImLinearRemapClamp(float s0, float s1, float d0, float d1, float x) { return ImSaturate((x - s0) / (s1 - s0)) * (d1 - d0) + d0; } inline ImVec2 ImMul(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x * rhs.x, lhs.y * rhs.y); } inline bool ImIsFloatAboveGuaranteedIntegerPrecision(float f) { return f <= -16777216 || f >= 16777216; } -inline float ImExponentialMovingAverage(float avg, float sample, int n){ avg -= avg / n; avg += sample / n; return avg; } +inline float ImExponentialMovingAverage(float avg, float sample, int n){ avg -= avg / (float)n; avg += sample / (float)n; return avg; } IM_MSVC_RUNTIME_CHECKS_RESTORE // Helpers: Geometry