From 693618d89a56ccc943f9f0608abf8737d5002d32 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 31 May 2010 00:04:38 +0000 Subject: Slight cleanup svn-id: r49339 --- engines/sci/engine/savegame.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index ae233f8c09..07c40b332c 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -751,14 +751,12 @@ static void reconstruct_stack(EngineState *retval) { // TODO: Move thie function to a more appropriate place, such as vm.cpp or script.cpp void SegManager::reconstructScripts(EngineState *s) { uint i; - SegmentObj *mobj; for (i = 0; i < _heap.size(); i++) { - mobj = _heap[i]; - if (!mobj || mobj->getType() != SEG_TYPE_SCRIPT) + if (!_heap[i] || _heap[i]->getType() != SEG_TYPE_SCRIPT) continue; - Script *scr = (Script *)mobj; + Script *scr = (Script *)_heap[i]; // FIXME: Unify this code with script_instantiate_* ? scr->load(g_sci->getResMan()); @@ -773,11 +771,10 @@ void SegManager::reconstructScripts(EngineState *s) { } for (i = 0; i < _heap.size(); i++) { - mobj = _heap[i]; - if (!mobj || mobj->getType() != SEG_TYPE_SCRIPT) + if (!_heap[i] || _heap[i]->getType() != SEG_TYPE_SCRIPT) continue; - Script *scr = (Script *)mobj; + Script *scr = (Script *)_heap[i]; // FIXME: Unify this code with Script::scriptObjInit ? ObjMap::iterator it; -- cgit v1.2.3