aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/plane32.cpp
diff options
context:
space:
mode:
authorColin Snover2016-03-06 21:30:03 -0600
committerColin Snover2016-03-06 21:34:44 -0600
commit56806161a747b1e806fa75acb56bafe7897dbea0 (patch)
tree1142dfa8b72bd83eba0fec061a61fdb1ab63b437 /engines/sci/graphics/plane32.cpp
parent36800b701764222ec0c527f68504d1d3dc2e1fcc (diff)
downloadscummvm-rg350-56806161a747b1e806fa75acb56bafe7897dbea0.tar.gz
scummvm-rg350-56806161a747b1e806fa75acb56bafe7897dbea0.tar.bz2
scummvm-rg350-56806161a747b1e806fa75acb56bafe7897dbea0.zip
SCI32: Make PlaneList definition order match declaration order
Diffstat (limited to 'engines/sci/graphics/plane32.cpp')
-rw-r--r--engines/sci/graphics/plane32.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/sci/graphics/plane32.cpp b/engines/sci/graphics/plane32.cpp
index de82a40f9e..6961a9ac1a 100644
--- a/engines/sci/graphics/plane32.cpp
+++ b/engines/sci/graphics/plane32.cpp
@@ -792,6 +792,17 @@ void Plane::update(const reg_t object) {
#pragma mark -
#pragma mark PlaneList
+void PlaneList::add(Plane *plane) {
+ for (iterator it = begin(); it != end(); ++it) {
+ if ((*it)->_priority > plane->_priority) {
+ insert(it, plane);
+ return;
+ }
+ }
+
+ push_back(plane);
+}
+
void PlaneList::clear() {
for (iterator it = begin(); it != end(); ++it) {
delete *it;
@@ -860,15 +871,4 @@ void PlaneList::remove_at(size_type index) {
delete PlaneListBase::remove_at(index);
}
-void PlaneList::add(Plane *plane) {
- for (iterator it = begin(); it != end(); ++it) {
- if ((*it)->_priority > plane->_priority) {
- insert(it, plane);
- return;
- }
- }
-
- push_back(plane);
-}
-
}