mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-14 00:46:08 +00:00
rs_new migration & link CScriptCameraWaypoint, CScriptActorKeyframe
Former-commit-id: 6f33908f35925bdf5807507701c717c5ad69e046
This commit is contained in:
@@ -9,6 +9,7 @@ namespace rstl {
|
||||
struct rmemory_allocator {
|
||||
rmemory_allocator() {}
|
||||
rmemory_allocator(const rmemory_allocator&) {}
|
||||
|
||||
template < typename T >
|
||||
static void allocate(T*& out, int count) {
|
||||
int size = count * sizeof(T);
|
||||
@@ -18,16 +19,7 @@ struct rmemory_allocator {
|
||||
out = reinterpret_cast< T* >(rs_new uchar[size]);
|
||||
}
|
||||
}
|
||||
// TODO: this fixes a regswap in vector::reserve
|
||||
template < typename T >
|
||||
static T* allocate2(int count) {
|
||||
int size = count * sizeof(T);
|
||||
if (size == 0) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return reinterpret_cast< T* >(rs_new uchar[size]);
|
||||
}
|
||||
}
|
||||
|
||||
template < typename T >
|
||||
static void deallocate(T* ptr) {
|
||||
if (ptr != nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user