From efc9d4ea80ae18f7370b4659052c23a1ee811a5d Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 8 Sep 2020 13:09:14 -0700 Subject: [PATCH] Remove duplicate color-clamping code from Graphics::bigrprint() For some reason, there's some color-clamping code in this function directly after already-existing color-clamping code. This code dates back to 2.2. And also, there's a smaller lower-bound of -1 for the red channel, despite the fact that this smaller value doesn't matter because the red would get clamped to 0 by the first code anyway. So even if this was put here for some strange reason, it doesn't matter because it doesn't do anything anyway. --- desktop_version/src/Graphics.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 124fbd61..3a7dd7c5 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -3000,14 +3000,6 @@ void Graphics::bigrprint(int x, int y, std::string& t, int r, int g, int b, bool x -= (len(t)); - if (r < -1) r = -1; - if (g < 0) g = 0; - if (b < 0) b = 0; - if (r > 255) r = 255; - if (g > 255) g = 255; - if (b > 255) b = 255; - ct.colour = getRGB(r, g, b); - if (cen) { x = std::max(160 - (int((len(t)/ 2.0)*sc)), 0 );