Clean up ConCmdManager (bug 5900, r=fyren).

This commit is contained in:
David Anderson
2013-08-31 11:51:23 -07:00
parent 435f2b8e39
commit ba927964c8
4 changed files with 190 additions and 361 deletions
+16
View File
@@ -140,6 +140,22 @@ class InlineList
return iterator(&head_);
}
iterator erase(iterator &at) {
iterator next = at;
next++;
remove(at.iter_);
// Iterator is no longer valid.
at.iter_ = NULL;
return next;
}
bool empty() const {
return head_.next_ == &head_;
}
void remove(Node *t) {
t->prev_->next_ = t->next_;
t->next_->prev_ = t->prev_;