fix: Various general fixes and changes
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
|
||||
void* operator new(std::size_t size)
|
||||
{
|
||||
return Memory::g_allocator->Request(size);
|
||||
return Memory::g_heap->Request(size);
|
||||
}
|
||||
|
||||
void operator delete(void* block)
|
||||
{
|
||||
Memory::g_allocator->Free(block);
|
||||
Memory::g_heap->Free(block);
|
||||
}
|
||||
@@ -21,7 +21,7 @@ kcp::cstringstream::~cstringstream()
|
||||
}
|
||||
|
||||
kcp::cstringstream& kcp::cstringstream::operator<<(char c) {
|
||||
this->string = (const char *)Memory::g_allocator->Realloc((void *)this->string, this->size + 1);
|
||||
this->string = (const char *)Memory::g_heap->Realloc((void *)this->string, this->size + 1);
|
||||
|
||||
if (!this->string)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace kcp
|
||||
}
|
||||
|
||||
void push_back(T value) {
|
||||
array = (T *)Memory::g_allocator->Realloc(array, sizeof(T) * (sz + 1));
|
||||
array = (T *)Memory::g_heap->Realloc(array, sizeof(T) * (sz + 1));
|
||||
array[sz++] = value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user