mirror of https://github.com/PrimeDecomp/prime.git
parent
6f4ade76fb
commit
129742b46b
|
@ -35,16 +35,7 @@ public:
|
|||
}
|
||||
void push_back(const T& val) { do_insert_before(x8_end, val); }
|
||||
void clear() {
|
||||
// iterator e = end();
|
||||
iterator cur = begin();
|
||||
while (cur != end()) {
|
||||
cur = erase(cur);
|
||||
}
|
||||
// node *e = x8_end;
|
||||
// node *cur = x4_start;
|
||||
// while (cur != e) {
|
||||
// cur = erase(cur);
|
||||
// }
|
||||
erase(begin(), end());
|
||||
}
|
||||
|
||||
iterator begin() { return iterator(x4_start); }
|
||||
|
@ -52,6 +43,13 @@ public:
|
|||
iterator end() { return iterator(x8_end); }
|
||||
const_iterator end() const { return const_iterator(x8_end); }
|
||||
|
||||
void erase(const iterator& start, const iterator& end) {
|
||||
iterator it = start;
|
||||
while (it != end) {
|
||||
erase(it++);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
struct node {
|
||||
node* x0_prev;
|
||||
|
|
Loading…
Reference in New Issue