Add some ListNode helper methods.
GitOrigin-RevId: b4e79174cac16752185cc8bfa2436b7393464289
This commit is contained in:
parent
cd451b7c45
commit
2a623b0a50
@ -83,7 +83,20 @@ struct ListNode {
|
||||
return next == this;
|
||||
}
|
||||
|
||||
private:
|
||||
ListNode *begin() {
|
||||
return next;
|
||||
}
|
||||
ListNode *end() {
|
||||
return this;
|
||||
}
|
||||
ListNode *get_next() {
|
||||
return next;
|
||||
}
|
||||
ListNode *get_prev() {
|
||||
return prev;
|
||||
}
|
||||
|
||||
protected:
|
||||
void clear() {
|
||||
next = this;
|
||||
prev = this;
|
||||
|
Loading…
Reference in New Issue
Block a user