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. --- backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp | 14 +++++++------- backends/graphics/gph/gph-graphics.cpp | 14 +++++++------- backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp | 14 +++++++------- backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 8 ++++---- 4 files changed, 25 insertions(+), 25 deletions(-) (limited to 'backends/graphics') diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp index 7d5f542ac0..e04c9145c2 100644 --- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp +++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp @@ -313,13 +313,13 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() { dstPitch = _hwScreen->pitch; for (r = _dirtyRectList; r != lastRect; ++r) { - register int dst_y = r->y + _currentShakePos; - register int dst_h = 0; - register int dst_w = r->w; - register int orig_dst_y = 0; - register int dst_x = r->x; - register int src_y; - register int src_x; + int dst_y = r->y + _currentShakePos; + int dst_h = 0; + int dst_w = r->w; + int orig_dst_y = 0; + int dst_x = r->x; + int src_y; + int src_x; if (dst_y < height) { dst_h = r->h; diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp index 9a97e97aa5..910dab9140 100644 --- a/backends/graphics/gph/gph-graphics.cpp +++ b/backends/graphics/gph/gph-graphics.cpp @@ -337,13 +337,13 @@ void GPHGraphicsManager::internUpdateScreen() { dstPitch = _hwScreen->pitch; for (r = _dirtyRectList; r != lastRect; ++r) { - register int dst_y = r->y + _currentShakePos; - register int dst_h = 0; - register int dst_w = r->w; - register int orig_dst_y = 0; - register int dst_x = r->x; - register int src_y; - register int src_x; + int dst_y = r->y + _currentShakePos; + int dst_h = 0; + int dst_w = r->w; + int orig_dst_y = 0; + int dst_x = r->x; + int src_y; + int src_x; if (dst_y < height) { dst_h = r->h; diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp index b61ee690bb..57b7f8136b 100644 --- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp +++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp @@ -346,13 +346,13 @@ void LinuxmotoSdlGraphicsManager::internUpdateScreen() { dstPitch = _hwscreen->pitch; for (r = _dirtyRectList; r != lastRect; ++r) { - register int dst_y = r->y + _currentShakePos; - register int dst_h = 0; - register int dst_w = r->w; - register int orig_dst_y = 0; - register int dst_x = r->x; - register int src_y; - register int src_x; + int dst_y = r->y + _currentShakePos; + int dst_h = 0; + int dst_w = r->w; + int orig_dst_y = 0; + int dst_x = r->x; + int src_y; + int src_x; if (dst_y < height) { dst_h = r->h; diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index 3d4e811462..fd6e2bd400 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -1225,12 +1225,12 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() { dstPitch = _hwScreen->pitch; for (r = _dirtyRectList; r != lastRect; ++r) { - register int dst_y = r->y + _currentShakePos; - register int dst_h = 0; + int dst_y = r->y + _currentShakePos; + int dst_h = 0; #ifdef USE_SCALERS - register int orig_dst_y = 0; + int orig_dst_y = 0; #endif - register int rx1 = r->x * scale1; + int rx1 = r->x * scale1; if (dst_y < height) { dst_h = r->h; -- cgit v1.2.3