[Scummvm-cvs-logs] SF.net SVN: scummvm:[39919] scummvm/trunk/engines/saga

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Apr 11 02:28:49 CEST 2009


Revision: 39919
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39919&view=rev
Author:   fingolfin
Date:     2009-04-11 00:28:49 +0000 (Sat, 11 Apr 2009)

Log Message:
-----------
SAGA: Removed some dead/obsolete code

Modified Paths:
--------------
    scummvm/trunk/engines/saga/events.cpp
    scummvm/trunk/engines/saga/list.h

Modified: scummvm/trunk/engines/saga/events.cpp
===================================================================
--- scummvm/trunk/engines/saga/events.cpp	2009-04-11 00:27:12 UTC (rev 39918)
+++ scummvm/trunk/engines/saga/events.cpp	2009-04-11 00:28:49 UTC (rev 39919)
@@ -98,7 +98,7 @@
 		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 @@
 				next_chain = chain_walk->chain;
 				free(chain_walk);
 			}
-			eventi = _eventList.eraseAndPrev(eventi);
+			eventi = _eventList.reverse_erase(eventi);
 		}
 	}
 

Modified: scummvm/trunk/engines/saga/list.h
===================================================================
--- scummvm/trunk/engines/saga/list.h	2009-04-11 00:27:12 UTC (rev 39918)
+++ scummvm/trunk/engines/saga/list.h	2009-04-11 00:28:49 UTC (rev 39919)
@@ -89,52 +89,6 @@
 		return pushBack(element);
 	}
 
-#if 0
-	iterator reorderUp(iterator pos, CompareFunction compareFunction) {
-		iterator i(pos);
-		int res;
-
-		--i;
-		while (i != Common::List<T>::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<T>::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 @@
 				return;
 			}
 	}
-
-	bool locate(const T* val, iterator& foundIterator) {
-
-		for (iterator i = Common::List<T>::begin(); i != Common::List<T>::end(); ++i)
-			if (val == i.operator->()) {
-				foundIterator = i;
-				return true;
-			}
-
-		return false;
-	}
 };
 
 } // End of namespace Saga


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list