diff options
| author | Max Horn | 2009-09-21 21:38:43 +0000 |
|---|---|---|
| committer | Max Horn | 2009-09-21 21:38:43 +0000 |
| commit | d2a6713a8e1bead4a959205419373e828f59bfb4 (patch) | |
| tree | 5d45de6635075f7fd990d5f41e163f607323a35d /engines/sci/engine/gc.cpp | |
| parent | 7f728af76e6f1ff9b5eda7c5b26b6d2da78bef35 (diff) | |
| download | scummvm-rg350-d2a6713a8e1bead4a959205419373e828f59bfb4.tar.gz scummvm-rg350-d2a6713a8e1bead4a959205419373e828f59bfb4.tar.bz2 scummvm-rg350-d2a6713a8e1bead4a959205419373e828f59bfb4.zip | |
SCI: Replace IntMapper Script::_objIndices and Common::Array Script::_objects by a HashMap -- goodbye, class IntMapper
svn-id: r44240
Diffstat (limited to 'engines/sci/engine/gc.cpp')
| -rw-r--r-- | engines/sci/engine/gc.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/engine/gc.cpp b/engines/sci/engine/gc.cpp index 0f5f4a5e57..2a2b3ad19d 100644 --- a/engines/sci/engine/gc.cpp +++ b/engines/sci/engine/gc.cpp @@ -119,8 +119,10 @@ reg_t_hash_map *find_all_used_references(EngineState *s) { wm.push(make_reg(script->_localsSegment, 0)); // All objects (may be classes, may be indirectly reachable) - for (uint obj_nr = 0; obj_nr < script->_objects.size(); obj_nr++) { - wm.push(script->_objects[obj_nr]._pos); + ObjMap::iterator it; + const ObjMap::iterator end = script->_objects.end(); + for (it = script->_objects.begin(); it != end; ++it) { + wm.push(it->_value._pos); } } } |
