diff options
author | Colin Snover | 2017-11-16 23:37:01 -0600 |
---|---|---|
committer | Eugene Sandulenko | 2017-11-18 22:35:12 +0100 |
commit | 7323bef77bd6acf180a6316950c06723075e8299 (patch) | |
tree | 2ac051e342bf8724fe90afeaa4cdb55ac62df8d2 /engines | |
parent | 54f8cf55ea6e041a6985056de06235a344b0dfa4 (diff) | |
download | scummvm-rg350-7323bef77bd6acf180a6316950c06723075e8299.tar.gz scummvm-rg350-7323bef77bd6acf180a6316950c06723075e8299.tar.bz2 scummvm-rg350-7323bef77bd6acf180a6316950c06723075e8299.zip |
FULLPIPE: Remove manual memory management of use list
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/messages.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 22d0c55896..db75146cb8 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -633,10 +633,7 @@ void GlobalMessageQueueList::disableQueueById(int id) { } int GlobalMessageQueueList::compact() { - int *useList = new int[size() + 2]; - - for (uint i = 0; i < size() + 2; i++) - useList[i] = 0; + Common::Array<bool> useList(size() + 2); for (uint i = 0; i < size();) { if (_storage[i]->_isFinished) { @@ -644,7 +641,7 @@ int GlobalMessageQueueList::compact() { delete remove_at(i); } else { if ((uint)_storage[i]->_id < size() + 2) - useList[_storage[i]->_id] = 1; + useList[_storage[i]->_id] = true; i++; } } @@ -656,8 +653,6 @@ int GlobalMessageQueueList::compact() { break; } - delete [] useList; - return i; } |