aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/fullpipe/messages.cpp11
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) {