mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Introduce player map references.
This commit is contained in:
parent
0ae2133254
commit
79558a32d9
12 changed files with 194 additions and 80 deletions
|
|
@ -31,7 +31,9 @@ template <class TO, class FROM> class RefManager : public LinkedListHead
|
|||
virtual ~RefManager() { clearReferences(); }
|
||||
|
||||
Reference<TO, FROM>* getFirst() { return ((Reference<TO, FROM>*) LinkedListHead::getFirst()); }
|
||||
Reference<TO, FROM> const* getFirst() const { return ((Reference<TO, FROM> const*) LinkedListHead::getFirst()); }
|
||||
Reference<TO, FROM>* getLast() { return ((Reference<TO, FROM>*) LinkedListHead::getLast()); }
|
||||
Reference<TO, FROM> const* getLast() const { return ((Reference<TO, FROM> const*) LinkedListHead::getLast()); }
|
||||
|
||||
iterator begin() { return iterator(getFirst()); }
|
||||
iterator end() { return iterator(NULL); }
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ template <class TO, class FROM> class Reference : public LinkedListElement
|
|||
}
|
||||
|
||||
Reference<TO,FROM>* next() { return((Reference<TO,FROM>*)LinkedListElement::next()); }
|
||||
Reference<TO,FROM>const* next() const { return((Reference<TO,FROM> const*)LinkedListElement::next()); }
|
||||
Reference<TO,FROM>* prev() { return((Reference<TO,FROM>*)LinkedListElement::prev()); }
|
||||
|
||||
inline TO* operator ->() const { return iRefTo; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue