fix: Various general fixes and changes

This commit is contained in:
Daniel Hammer committed 2025-03-07 23:57:20 +01:00
1 parent 6c5f6ecd47
commit 8cbb8d4472
8 files changed
+25 -42

No files matched your search

+2 -2
View File
@@ -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);
}
+1 -1
View File
@@ -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)
{
+1 -1
View File
@@ -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;
}