Fixed 2 bugs with the C++ elist version, one pretty bad, not sure why
things didnt crashed or worse until now.
This commit is contained in:
parent
05133dc72e
commit
829f0ee412
1 changed files with 2 additions and 2 deletions
|
@ -138,11 +138,11 @@ public:
|
|||
}
|
||||
|
||||
bool empty() {
|
||||
return head.prev() == head.next();
|
||||
return &head == head.next();
|
||||
}
|
||||
|
||||
T& front() const { return head.next()->info(); }
|
||||
T& back() const { return head.back()->info(); }
|
||||
T& back() const { return head.prev()->info(); }
|
||||
|
||||
iterator begin() {
|
||||
return iterator(head.next());
|
||||
|
|
Loading…
Add table
Reference in a new issue