From d3c36166dfd53532af9fbe8b3754c269d4db632a Mon Sep 17 00:00:00 2001 From: ephphatha Date: Mon, 5 Jul 2021 20:19:20 +1000 Subject: [PATCH] Add explicit cast for LogicalToOutput In practice this function is only called with int arguments, can probably change the specialisation to std::is_integral --- Source/utils/display.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/utils/display.h b/Source/utils/display.h index 23972b5d8..1f890a636 100644 --- a/Source/utils/display.h +++ b/Source/utils/display.h @@ -89,8 +89,8 @@ void LogicalToOutput(T *x, T *y) float scaleX; SDL_RenderGetScale(renderer, &scaleX, NULL); - *x *= scaleX; - *y *= scaleX; + *x = static_cast(*x * scaleX); + *y = static_cast(*x * scaleX); #else if (!OutputRequiresScaling()) return;