aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authormd52011-03-09 23:33:26 +0200
committermd52011-03-09 23:33:26 +0200
commit5c504739bd16b4a3eecd57b117010baad0d3ef1d (patch)
tree61e0fbb841aba5a9af614e280575b480471f4b87 /engines/sci/engine
parent952d1a084c851a33d8094e384f80890141d63157 (diff)
downloadscummvm-rg350-5c504739bd16b4a3eecd57b117010baad0d3ef1d.tar.gz
scummvm-rg350-5c504739bd16b4a3eecd57b117010baad0d3ef1d.tar.bz2
scummvm-rg350-5c504739bd16b4a3eecd57b117010baad0d3ef1d.zip
SCI: Removed unnecessary parameter from deallocate()
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/seg_manager.cpp13
-rw-r--r--engines/sci/engine/seg_manager.h2
2 files changed, 7 insertions, 8 deletions
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index c75ceab280..2be3184b59 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -63,7 +63,7 @@ void SegManager::resetSegMan() {
// Free memory
for (uint i = 0; i < _heap.size(); i++) {
if (_heap[i])
- deallocate(i, false);
+ deallocate(i);
}
_heap.clear();
@@ -151,7 +151,7 @@ Script *SegManager::allocateScript(int script_nr, SegmentId *segid) {
return (Script *)mem;
}
-void SegManager::deallocate(SegmentId seg, bool recursive) {
+void SegManager::deallocate(SegmentId seg) {
VERIFY(check(seg), "invalid seg id");
SegmentObj *mobj = _heap[seg];
@@ -159,8 +159,8 @@ void SegManager::deallocate(SegmentId seg, bool recursive) {
if (mobj->getType() == SEG_TYPE_SCRIPT) {
Script *scr = (Script *)mobj;
_scriptSegMap.erase(scr->getScriptNumber());
- if (recursive && scr->_localsSegment)
- deallocate(scr->_localsSegment, recursive);
+ if (scr->_localsSegment)
+ deallocate(scr->_localsSegment);
}
delete mobj;
@@ -176,8 +176,7 @@ bool SegManager::isHeapObject(reg_t pos) const {
}
void SegManager::deallocateScript(int script_nr) {
- SegmentId seg = getScriptSegment(script_nr);
- deallocate(seg, true);
+ deallocate(getScriptSegment(script_nr));
}
Script *SegManager::getScript(const SegmentId seg) {
@@ -864,7 +863,7 @@ bool SegManager::freeDynmem(reg_t addr) {
if (addr.segment < 1 || addr.segment >= _heap.size() || !_heap[addr.segment] || _heap[addr.segment]->getType() != SEG_TYPE_DYNMEM)
return false; // error
- deallocate(addr.segment, true);
+ deallocate(addr.segment);
return true; // OK
}
diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h
index 61fa2e2245..58c88ca870 100644
--- a/engines/sci/engine/seg_manager.h
+++ b/engines/sci/engine/seg_manager.h
@@ -477,7 +477,7 @@ private:
private:
SegmentObj *allocSegment(SegmentObj *mem, SegmentId *segid);
- void deallocate(SegmentId seg, bool recursive);
+ void deallocate(SegmentId seg);
void createClassTable();
SegmentId findFreeSegment() const;