diff options
author | Max Horn | 2011-03-07 23:21:27 +0100 |
---|---|---|
committer | Max Horn | 2011-03-07 23:21:35 +0100 |
commit | 2cbefc8bb5644847a29427272757d4a234cfdf13 (patch) | |
tree | 7e793ff240096117c9d059ad7aa3c4989e7c3b71 /engines/sci/engine/gc.cpp | |
parent | e8151026594c16a84d390059faa5aaaeafa621da (diff) | |
download | scummvm-rg350-2cbefc8bb5644847a29427272757d4a234cfdf13.tar.gz scummvm-rg350-2cbefc8bb5644847a29427272757d4a234cfdf13.tar.bz2 scummvm-rg350-2cbefc8bb5644847a29427272757d4a234cfdf13.zip |
SCI: Constify some code
Diffstat (limited to 'engines/sci/engine/gc.cpp')
-rw-r--r-- | engines/sci/engine/gc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/engine/gc.cpp b/engines/sci/engine/gc.cpp index 85238ec851..6d00c20422 100644 --- a/engines/sci/engine/gc.cpp +++ b/engines/sci/engine/gc.cpp @@ -108,7 +108,7 @@ AddrSet *findAllActiveReferences(EngineState *s) { // Initialize value stack // We do this one by hand since the stack doesn't know the current execution stack - Common::List<ExecStack>::iterator iter = s->_executionStack.reverse_begin(); + Common::List<ExecStack>::const_iterator iter = s->_executionStack.reverse_begin(); // Skip fake kernel stack frame if it's on top if ((*iter).type == EXEC_STACK_TYPE_KERNEL) @@ -116,9 +116,9 @@ AddrSet *findAllActiveReferences(EngineState *s) { assert((iter != s->_executionStack.end()) && ((*iter).type != EXEC_STACK_TYPE_KERNEL)); - ExecStack &xs = *iter; + const StackPtr sp = iter->sp; - for (reg_t *pos = s->stack_base; pos < xs.sp; pos++) + for (reg_t *pos = s->stack_base; pos < sp; pos++) wm.push(*pos); debugC(kDebugLevelGC, "[GC] -- Finished adding value stack"); @@ -126,7 +126,7 @@ AddrSet *findAllActiveReferences(EngineState *s) { // Init: Execution Stack for (iter = s->_executionStack.begin(); iter != s->_executionStack.end(); ++iter) { - ExecStack &es = *iter; + const ExecStack &es = *iter; if (es.type != EXEC_STACK_TYPE_KERNEL) { wm.push(es.objp); |