diff options
author | Eugene Sandulenko | 2013-09-02 22:20:15 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-06 14:51:24 +0300 |
commit | 0bc0aa16581a251a628c93125f3209aa8fcd1ddb (patch) | |
tree | 3a1baabcd1dcb21a078bb39ef3c4490344dba724 /engines | |
parent | 0b4318267424f6220948c122d0db73e93deef39e (diff) | |
download | scummvm-rg350-0bc0aa16581a251a628c93125f3209aa8fcd1ddb.tar.gz scummvm-rg350-0bc0aa16581a251a628c93125f3209aa8fcd1ddb.tar.bz2 scummvm-rg350-0bc0aa16581a251a628c93125f3209aa8fcd1ddb.zip |
FULLPIPE: Implement GlobalMessageQueueList::compact()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/messages.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index dcf9a222f8..96ed389527 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -465,9 +465,16 @@ void GlobalMessageQueueList::disableQueueById(int id) { } int GlobalMessageQueueList::compact() { - warning("STUB: GlobalMessageQueueList::compact()"); + for (uint i = 0; i < size();) { + if (((MessageQueue *)((*this).operator[](i)))->_isFinished) { + disableQueueById(((MessageQueue *)((*this).operator[](i)))->_id); + remove_at(i); + } else { + i++; + } + } - return 0; + return size() + 1; } void GlobalMessageQueueList::addMessageQueue(MessageQueue *msg) { |