From 46ddb35d9fa8520aa3effe7139c248db65d5fb8a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 11 Apr 2009 00:28:49 +0000 Subject: SAGA: Removed some dead/obsolete code svn-id: r39919 --- engines/saga/events.cpp | 4 ++-- engines/saga/list.h | 57 ------------------------------------------------- 2 files changed, 2 insertions(+), 59 deletions(-) diff --git a/engines/saga/events.cpp b/engines/saga/events.cpp index 482bb6d46e..cea1d771d7 100644 --- a/engines/saga/events.cpp +++ b/engines/saga/events.cpp @@ -98,7 +98,7 @@ int Events::handleEvents(long msec) { if ((result == kEvStDelete) || (result == kEvStInvalidCode)) { // If there is no event chain, delete the base event. if (event_p->chain == NULL) { - eventi = _eventList.eraseAndPrev(eventi); + eventi = _eventList.reverse_erase(eventi); } else { // If there is an event chain present, move the next event // in the chain up, adjust it by the previous delta time, @@ -650,7 +650,7 @@ int Events::clearList(bool playQueuedMusic) { next_chain = chain_walk->chain; free(chain_walk); } - eventi = _eventList.eraseAndPrev(eventi); + eventi = _eventList.reverse_erase(eventi); } } diff --git a/engines/saga/list.h b/engines/saga/list.h index 39da8db0c3..f7d7eee8fc 100644 --- a/engines/saga/list.h +++ b/engines/saga/list.h @@ -89,52 +89,6 @@ public: return pushBack(element); } -#if 0 - iterator reorderUp(iterator pos, CompareFunction compareFunction) { - iterator i(pos); - int res; - - --i; - while (i != Common::List::end()) { - res = compareFunction(i.operator*(), pos.operator*()); - if (res <= 0) { - T temp(*pos); - erase(pos); - ++i; - return insert(i, temp); - } - --i; - } - return pos; - } - - iterator reorderDown(iterator pos, CompareFunction compareFunction) { - iterator i(pos); - int res; - - ++i; - while (i != Common::List::end()) { - res = compareFunction(i.operator*(), pos.operator*()); - if (res >= 0) { - T temp(*pos); - erase(pos); - return insert(i, temp); - } - ++i; - } - return pos; - } -#endif - - iterator eraseAndPrev(iterator pos) { - assert(pos != Common_List::end()); - iterator res(pos); - - --res; - erase(pos); - return res; - } - void remove(const T* val) { for (iterator i = Common_List::begin(); i != Common_List::end(); ++i) if (val == i.operator->()) { @@ -142,17 +96,6 @@ public: return; } } - - bool locate(const T* val, iterator& foundIterator) { - - for (iterator i = Common::List::begin(); i != Common::List::end(); ++i) - if (val == i.operator->()) { - foundIterator = i; - return true; - } - - return false; - } }; } // End of namespace Saga -- cgit v1.2.3