From a5bc89102e790d38d23a0a220ee2d42baee647a1 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Mon, 6 Nov 2017 22:45:32 -0600 Subject: ALL: Remove obsolete register keyword The register keyword was deprecated from the C++11 standard, , and removed from the C++17 standard, , so cannot exist in a well-formed C++17 program. It has never done anything in GCC and because of the way it is specified in the standard, it is “as meaningful as whitespace” . The one remaining use of the register keyword is in the DS backend, where it is used to create a local register variable using the non-standard GCC Extended Asm feature. Closes gh-1079. --- graphics/scaler/2xsai.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'graphics/scaler/2xsai.cpp') diff --git a/graphics/scaler/2xsai.cpp b/graphics/scaler/2xsai.cpp index 757c1cf8de..4389d52745 100644 --- a/graphics/scaler/2xsai.cpp +++ b/graphics/scaler/2xsai.cpp @@ -92,7 +92,7 @@ void Super2xSaITemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uin } else if (color5 == color3 && color2 != color6) { product2b = product1b = color5; } else if (color5 == color3 && color2 == color6) { - register int r = 0; + int r = 0; r += GetResult(color6, color5, color1, colorA1); r += GetResult(color6, color5, color4, colorB1); @@ -227,7 +227,7 @@ void SuperEagleTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uin product2a = interpolate_1_1(color2, color3); } } else { - register int r = 0; + int r = 0; r += GetResult(color6, color5, color1, colorA1); r += GetResult(color6, color5, color4, colorB1); @@ -282,8 +282,7 @@ void _2xSaITemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 for (int i = 0; i < width; ++i) { - register unsigned colorA, colorB; - unsigned colorC, colorD, + unsigned colorA, colorB, colorC, colorD, colorE, colorF, colorG, colorH, colorI, colorJ, colorK, colorL, colorM, colorN, colorO; unsigned product, product1, product2; @@ -347,7 +346,7 @@ void _2xSaITemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 product1 = colorA; product2 = colorA; } else { - register int r = 0; + int r = 0; product1 = interpolate_1_1(colorA, colorC); product = interpolate_1_1(colorA, colorB); -- cgit v1.2.3