From 3ba6ced83cd5d8f7f81bb487615f609332786f4c Mon Sep 17 00:00:00 2001 From: Gunter Labes Date: Thu, 13 Feb 2025 22:11:30 +0100 Subject: [PATCH] Make int conversion explicit --- src/utils/math.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/math.hpp b/src/utils/math.hpp index dee73316e71..d12c952f5f4 100644 --- a/src/utils/math.hpp +++ b/src/utils/math.hpp @@ -80,7 +80,7 @@ constexpr T modulo(T num, int mod, T min = 0) constexpr int round_damage(double base_damage, int bonus, int divisor) { if (base_damage==0) return 0; const int rounding = divisor / 2 - (bonus <= divisor || divisor==1 ? 0 : 1); - return std::max(1, (base_damage * bonus + rounding) / divisor); + return std::max(1, static_cast(base_damage * bonus + rounding) / divisor); } template