From 5388210c6259c29786c6c8e79f8db6f522b8687d Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 20 Jun 2025 09:53:18 +0200 Subject: [PATCH] fix a clang warning --- src/r_segs.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/r_segs.cpp b/src/r_segs.cpp index 10ef54749..824494fd3 100644 --- a/src/r_segs.cpp +++ b/src/r_segs.cpp @@ -542,8 +542,7 @@ void R_RenderMaskedSegRange(drawseg_t *drawseg, INT32 x1, INT32 x2) template static constexpr T saturating_add(T x, T y) noexcept { - INT64 z; - z = static_cast(x) + static_cast(y); + INT64 z = static_cast(x) + static_cast(y); if (z > static_cast(std::numeric_limits::max())) { z = static_cast(std::numeric_limits::max()); @@ -558,8 +557,7 @@ static constexpr T saturating_add(T x, T y) noexcept template static constexpr T saturating_mul(T x, T y) noexcept { - INT64 z; - z = static_cast(x) * static_cast(y); + INT64 z = static_cast(x) * static_cast(y); if (z > static_cast(std::numeric_limits::max())) { z = static_cast(std::numeric_limits::max());