main: Add EnsureWorldPakReady

This commit is contained in:
2022-04-11 18:42:08 -04:00
parent 7a95698329
commit 292dfa1eea
15 changed files with 119 additions and 54 deletions

View File

@@ -30,26 +30,18 @@ public:
if (x4_count == 0 && x8_capacity == 0) {
xc_items = NULL;
} else {
if (x8_capacity == 0) {
size_t sz = x8_capacity * sizeof(T);
if (sz == 0) {
xc_items = NULL;
} else {
Alloc::allocate(xc_items, x8_capacity);
}
// what's going on here?
iterator iter;
const_iterator otherIter;
otherIter = other.begin();
iter = begin();
for (size_t i = 0; i < x4_count; ++i) {
iter = *otherIter;
++iter;
++otherIter;
x0_allocator.allocate(xc_items, sz);
}
rstl::uninitialized_copy_n(data(), other.data(), x4_count);
}
}
~vector() {
rstl::destroy(begin(), end());
Alloc::deallocate(xc_items);
x0_allocator.deallocate(xc_items);
}
void reserve(size_t size); /* {