aboutsummaryrefslogtreecommitdiff
path: root/engines/cge
diff options
context:
space:
mode:
authorColin Snover2017-11-06 22:45:32 -0600
committerColin Snover2017-12-03 20:27:42 -0600
commita5bc89102e790d38d23a0a220ee2d42baee647a1 (patch)
tree32c3bdb45c8cd7cf3ef9ea1f7af2c9337a079334 /engines/cge
parentef33d8a2fb987f3fdbeb094aca2ecdfcd5b269ba (diff)
downloadscummvm-rg350-a5bc89102e790d38d23a0a220ee2d42baee647a1.tar.gz
scummvm-rg350-a5bc89102e790d38d23a0a220ee2d42baee647a1.tar.bz2
scummvm-rg350-a5bc89102e790d38d23a0a220ee2d42baee647a1.zip
ALL: Remove obsolete register keyword
The register keyword was deprecated from the C++11 standard, <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4193.html#809>, and removed from the C++17 standard, <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340>, so cannot exist in a well-formed C++17 program. It has never done anything in GCC <https://gcc.gnu.org/ml/gcc/2010-05/msg00113.html> and because of the way it is specified in the standard, it is “as meaningful as whitespace” <http://www.drdobbs.com/keywords-that-arent-or-comments-by-anoth/184403859>. 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.
Diffstat (limited to 'engines/cge')
-rw-r--r--engines/cge/cge_main.cpp4
-rw-r--r--engines/cge/snail.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index e738b6ebb3..b60f201cb0 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -378,7 +378,7 @@ void CGEEngine::syncGame(Common::SeekableReadStream *readStream, Common::WriteSt
if (s.isSaving()) {
for (int i = 0; i < kPocketNX; i++) {
- register Sprite *pocSpr = _pocket[i];
+ Sprite *pocSpr = _pocket[i];
_pocref[i] = (pocSpr) ? pocSpr->_ref : -1;
}
@@ -417,7 +417,7 @@ void CGEEngine::syncGame(Common::SeekableReadStream *readStream, Common::WriteSt
}
for (int i = 0; i < kPocketNX; i++) {
- register int r = _pocref[i];
+ int r = _pocref[i];
_pocket[i] = (r < 0) ? NULL : _vga->_spareQ->locate(r);
}
}
diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp
index bfeb436e94..f6d02304bc 100644
--- a/engines/cge/snail.cpp
+++ b/engines/cge/snail.cpp
@@ -1192,7 +1192,7 @@ void CGEEngine::snFlash(bool on) {
if (pal) {
memcpy(pal, _vga->_sysPal, kPalSize);
for (int i = 0; i < kPalCount; i++) {
- register int c;
+ int c;
c = pal[i]._r << 1;
pal[i]._r = (c < 64) ? c : 63;
c = pal[i]._g << 1;