Expand CStateManager.

- Expand ct/dt
- Add AllocateUniqueId
- Add rstl::set, multimap, reserved_vector::resize


Former-commit-id: 92def96f31
This commit is contained in:
Henrique Gemignani Passos Lima
2022-11-15 15:45:15 +02:00
parent e02198a8c9
commit 45ec66abc2
14 changed files with 189 additions and 37 deletions

View File

@@ -25,16 +25,8 @@ public:
, xc_empty_prev(reinterpret_cast< node* >(&xc_empty_prev))
, x10_empty_next(reinterpret_cast< node* >(&xc_empty_prev))
, x14_count(0) {}
~list() {
node* cur = x4_start;
while (cur != x8_end) {
node* it = cur;
node* next = cur->get_next();
cur = next;
destroy(it);
x0_allocator.deallocate(it);
}
}
~list();
void push_back(const T& val) { do_insert_before(x8_end, val); }
void clear() {
erase(begin(), end());
@@ -160,6 +152,18 @@ private:
int x14_count;
};
template < typename T, typename Alloc>
list<T, Alloc>::~list() {
node* cur = x4_start;
while (cur != x8_end) {
node* it = cur;
node* next = cur->get_next();
cur = next;
destroy(it);
x0_allocator.deallocate(it);
}
}
} // namespace rstl
#endif // _RSTL_LIST