aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/statics.cpp
diff options
context:
space:
mode:
authorColin Snover2017-11-16 12:16:26 -0600
committerEugene Sandulenko2017-11-18 22:35:12 +0100
commita6fc77ec65561f9f0768322b618f6ceac21f1efc (patch)
tree9b09df967449ea694ac7beea8e3de3e3cb9b126f /engines/fullpipe/statics.cpp
parent4cc64c4139903c9a6b769855ab2a8a8125beb644 (diff)
downloadscummvm-rg350-a6fc77ec65561f9f0768322b618f6ceac21f1efc.tar.gz
scummvm-rg350-a6fc77ec65561f9f0768322b618f6ceac21f1efc.tar.bz2
scummvm-rg350-a6fc77ec65561f9f0768322b618f6ceac21f1efc.zip
FULLPIPE: Clarify ownership of pointer arrays in StaticANIObject
Diffstat (limited to 'engines/fullpipe/statics.cpp')
-rw-r--r--engines/fullpipe/statics.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index c1daea0c64..a85b90b595 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -112,16 +112,8 @@ StaticANIObject::StaticANIObject() {
}
StaticANIObject::~StaticANIObject() {
- for (uint i = 0; i < _staticsList.size(); i++)
- delete _staticsList[i];
-
- _staticsList.clear();
-
- for (uint i = 0; i < _movements.size(); i++)
- delete _movements[i];
-
- _movements.clear();
-
+ Common::for_each(_staticsList.begin(), _staticsList.end(), Common::DefaultDeleter<Statics>());
+ Common::for_each(_movements.begin(), _movements.end(), Common::DefaultDeleter<Movement>());
g_fp->_aniHandler->detachAllObjects();
}