More CCameraManager progress

This commit is contained in:
2024-09-22 23:56:21 -06:00
parent 3d73c595c0
commit 141d88c0f7
15 changed files with 267 additions and 35 deletions

View File

@@ -3,6 +3,7 @@
#include "types.h"
#include "rstl/iterator.hpp"
#include "rstl/pointer_iterator.hpp"
#include "rstl/rmemory_allocator.hpp"
@@ -215,17 +216,17 @@ typename vector< T, Alloc >::iterator vector< T, Alloc >::erase(iterator it) {
return erase(it, it + 1);
}
// TODO nonmatching (CCameraManager::RemoveCinemaCamera)
template < typename T, typename Alloc >
typename vector< T, Alloc >::iterator vector< T, Alloc >::erase(iterator first, iterator last) {
destroy(first, last);
iterator start = begin();
int newCount = rstl::distance(first, start);
int newCount = start - first;
iterator moved = start + newCount;
for (iterator it = last; it != end(); ++it) {
for (iterator it = last; it != end(); ++moved, ++newCount, ++it) {
construct(&*moved, *it);
++moved;
++newCount;
}
x4_count = newCount;