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/platform/symbian/src/portdefs.h | 6 +++--- backends/platform/symbian/src/vsnprintf.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'backends/platform/symbian/src') diff --git a/backends/platform/symbian/src/portdefs.h b/backends/platform/symbian/src/portdefs.h index e2465e4767..f9e0d04064 100644 --- a/backends/platform/symbian/src/portdefs.h +++ b/backends/platform/symbian/src/portdefs.h @@ -99,9 +99,9 @@ typedef signed long int int32; /* convert double float to double int (dfdi) */ long long inline scumm_fixdfdi (double a1) { // __fixdfdi (double a1) - register union double_long dl1; - register int exp; - register long long l; + union double_long dl1; + int exp; + long long l; dl1.d = a1; diff --git a/backends/platform/symbian/src/vsnprintf.h b/backends/platform/symbian/src/vsnprintf.h index 6e75719d55..1e25716cd8 100644 --- a/backends/platform/symbian/src/vsnprintf.h +++ b/backends/platform/symbian/src/vsnprintf.h @@ -212,17 +212,17 @@ #endif #define fast_memcpy(d,s,n) \ -{ register size_t nn = (size_t)(n); \ +{ size_t nn = (size_t)(n); \ if (nn >= breakeven_point) memcpy((d), (s), nn); \ else if (nn > 0) { /* proc call overhead is worth only for large strings*/\ - register char *dd; register const char *ss; \ + char *dd; const char *ss; \ for (ss=(s), dd=(d); nn>0; nn--) *dd++ = *ss++; } } #define fast_memset(d,c,n) \ -{ register size_t nn = (size_t)(n); \ +{ size_t nn = (size_t)(n); \ if (nn >= breakeven_point) memset((d), (int)(c), nn); \ else if (nn > 0) { /* proc call overhead is worth only for large strings*/\ - register char *dd; register const int cc=(int)(c); \ + char *dd; const int cc=(int)(c); \ for (dd=(d); nn>0; nn--) *dd++ = cc; } } -- cgit v1.2.3