From 617f6179c1b96a1d2f8209dac8a3bf23da2415de Mon Sep 17 00:00:00 2001 From: D G Turner Date: Fri, 30 Nov 2012 12:08:55 +0000 Subject: DREAMWEB: Change various loop variables to uint, rather than size_t. This is partly for readability and partly to avoid any possible portability issues i.e. though they should be the same, size_t is defined by system headers, whereas uint is defined within our build system. Also, replaced a array size calculation with our ARRAYSIZE macro. --- engines/dreamweb/object.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engines/dreamweb/object.cpp') diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 1af9b036aa..bb9e9677d7 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -31,7 +31,7 @@ void DreamWebEngine::showRyanPage() { void DreamWebEngine::findAllRyan() { memset(_ryanInvList, 0xff, sizeof(_ryanInvList)); - for (size_t i = 0; i < kNumexobjects; ++i) { + for (uint i = 0; i < kNumexobjects; ++i) { const DynObject *extra = getExAd(i); if (extra->mapad[0] != kExObjectType) continue; @@ -47,8 +47,8 @@ void DreamWebEngine::findAllRyan() { void DreamWebEngine::fillRyan() { ObjectRef *inv = &_ryanInvList[_vars._ryanPage * 10]; findAllRyan(); - for (size_t i = 0; i < 2; ++i) { - for (size_t j = 0; j < 5; ++j) { + for (uint i = 0; i < 2; ++i) { + for (uint j = 0; j < 5; ++j) { obToInv(inv->_index, inv->_type, kInventx + j * kItempicsize, kInventy + i * kItempicsize); ++inv; } @@ -1130,7 +1130,7 @@ void DreamWebEngine::emergencyPurge() { void DreamWebEngine::purgeAnItem() { const DynObject *extraObjects = _exData; - for (size_t i = 0; i < kNumexobjects; ++i) { + for (uint i = 0; i < kNumexobjects; ++i) { if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255 && extraObjects[i].initialLocation != _realLocation) { deleteExObject(i); @@ -1138,7 +1138,7 @@ void DreamWebEngine::purgeAnItem() { } } - for (size_t i = 0; i < kNumexobjects; ++i) { + for (uint i = 0; i < kNumexobjects; ++i) { if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255) { deleteExObject(i); return; -- cgit v1.2.3