1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 15:26:00 +02:00

Improved hotswapping with extension modules

This commit is contained in:
Brian Fiete 2024-12-29 11:02:17 -08:00
parent 769036584a
commit fd4fd43ce3
19 changed files with 836 additions and 232 deletions

View file

@ -8,7 +8,7 @@ NS_BF_BEGIN;
#define DEQUE_IDX(i) (this->mVals[((i) + this->mOffset) % this->mAllocSize])
#define DEQUE_IDX_ON(arr, i) ((arr).mVals[((i) + (arr).mOffset) % (arr).mAllocSize])
template <typename T, typename TAlloc = AllocatorCLib<T> >
template <typename T, typename TAlloc = AllocatorCLib >
class DequeBase : public TAlloc
{
public:
@ -370,7 +370,7 @@ protected:
void Grow(intptr newSize)
{
T* newVals = TAlloc::allocate(newSize);
T* newVals = TAlloc::allocate<T>(newSize);
if (this->mVals != NULL)
{
if (this->mSize > 0)
@ -707,7 +707,7 @@ class DequeImpl<T, TAlloc, true> : public DequeBase<T, TAlloc>
protected:
void Grow(intptr newSize)
{
T* newVals = TAlloc::allocate(newSize);
T* newVals = TAlloc::allocate<T>(newSize);
if (this->mVals != NULL)
{
if (this->mSize > 0)
@ -1043,7 +1043,7 @@ public:
}
};
template <typename T, typename TAlloc = AllocatorCLib<T> >
template <typename T, typename TAlloc = AllocatorCLib >
class Deque : public DequeImpl<T, TAlloc, std::is_pod<T>::value>
{
public: