diff options
-rw-r--r-- | saga/actor.cpp | 2 | ||||
-rw-r--r-- | saga/list.h | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/saga/actor.cpp b/saga/actor.cpp index 73ee425361..43f262f26a 100644 --- a/saga/actor.cpp +++ b/saga/actor.cpp @@ -1203,7 +1203,7 @@ void Actor::createDrawOrderList() { int i; ActorData *actor; ObjectData *obj; - CommonObjectOrderList::CompareFunction *compareFunction; + CommonObjectOrderList::CompareFunction compareFunction; if (_vm->_scene->getFlags() & kSceneFlagISO) { compareFunction = &tileCommonObjectCompare; diff --git a/saga/list.h b/saga/list.h index f53dcd0b18..17106bdfcd 100644 --- a/saga/list.h +++ b/saga/list.h @@ -29,7 +29,7 @@ namespace Saga { template <class T> class SortedList : public Common::List<T> { public: - typedef int ( CompareFunction ) (const T& , const T&); + typedef int (*CompareFunction) (const T& a, const T& b); typedef typename Common::List<T>::iterator iterator; typedef typename Common::List<T>::const_iterator const_iterator; @@ -62,15 +62,15 @@ public: return insert(pos, init); } - iterator pushFront(const T& element, CompareFunction* compareFunction) { + iterator pushFront(const T& element, CompareFunction compareFunction) { return insert(Common::List<T>::begin(), element, compareFunction); } - iterator pushBack(const T& element, CompareFunction* compareFunction) { + iterator pushBack(const T& element, CompareFunction compareFunction) { return insert(Common::List<T>::end(), element, compareFunction); } - iterator insert(iterator pos, const T& element, CompareFunction* compareFunction) { + iterator insert(iterator pos, const T& element, CompareFunction compareFunction) { int res; for (iterator i = Common::List<T>::begin(); i != Common::List<T>::end(); ++i) { @@ -82,7 +82,7 @@ public: return pushBack(element); } - iterator reorderUp(iterator pos, CompareFunction* compareFunction) { + iterator reorderUp(iterator pos, CompareFunction compareFunction) { iterator i(pos); int res; @@ -101,7 +101,7 @@ public: return pos; } - iterator reorderDown(iterator pos, CompareFunction* compareFunction) { + iterator reorderDown(iterator pos, CompareFunction compareFunction) { iterator i(pos); int res; |