From ced2306fc5afdde8c3551ac3257c6298d39d2e37 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 28 Apr 2019 11:39:59 +0200 Subject: Turn EFB_WIDTH/EFB_HEIGHT into constexpr https://bugs.dolphin-emu.org/issues/11692#note-5 Also change const into constexpr while we're at it. --- Source/Core/VideoBackends/Software/EfbInterface.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoBackends/Software/EfbInterface.cpp') diff --git a/Source/Core/VideoBackends/Software/EfbInterface.cpp b/Source/Core/VideoBackends/Software/EfbInterface.cpp index 8eebb375d3..9548dece5a 100644 --- a/Source/Core/VideoBackends/Software/EfbInterface.cpp +++ b/Source/Core/VideoBackends/Software/EfbInterface.cpp @@ -588,8 +588,9 @@ void EncodeXFB(u8* xfb_in_ram, u32 memory_stride, const MathUtil::Rectangle // // In our implementation, the garbage just so happens to be the top or bottom row. // Statistically, that could happen. - u16 y_prev = static_cast(std::max(clamp_top ? source_rect.top : 0, y - 1)); - u16 y_next = static_cast(std::min(clamp_bottom ? source_rect.bottom : EFB_HEIGHT, y + 1)); + const u16 y_prev = static_cast(std::max(clamp_top ? source_rect.top : 0, y - 1)); + const u16 y_next = + static_cast(std::min(clamp_bottom ? source_rect.bottom : EFB_HEIGHT, y + 1)); // Get a scanline of YUV pixels in 4:4:4 format for (int i = 1, x = left; x < right; i++, x++) -- cgit v1.2.3