From 56806161a747b1e806fa75acb56bafe7897dbea0 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Sun, 6 Mar 2016 21:30:03 -0600 Subject: SCI32: Make PlaneList definition order match declaration order --- engines/sci/graphics/plane32.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'engines/sci/graphics/plane32.cpp') 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); -} - } -- cgit v1.2.3