Fix compilation warnings

This commit is contained in:
Wojtek Figat
2025-06-05 18:32:36 +02:00
parent f462a2187f
commit 0670c0bbd3
2 changed files with 5 additions and 5 deletions

View File

@@ -11,7 +11,7 @@ void ArenaAllocator::Free()
while (page)
{
#if COMPILE_WITH_PROFILER
ProfilerMemory::OnGroupUpdate(ProfilerMemory::Groups::MallocArena, -page->Size, -1);
ProfilerMemory::OnGroupUpdate(ProfilerMemory::Groups::MallocArena, -(int64)page->Size, -1);
#endif
Allocator::Free(page->Memory);
Page* next = page->Next;
@@ -35,7 +35,7 @@ void* ArenaAllocator::Allocate(uint64 size, uint64 alignment)
{
uint64 pageSize = Math::Max<uint64>(_pageSize, size);
#if COMPILE_WITH_PROFILER
ProfilerMemory::OnGroupUpdate(ProfilerMemory::Groups::MallocArena, pageSize, 1);
ProfilerMemory::OnGroupUpdate(ProfilerMemory::Groups::MallocArena, (int64)pageSize, 1);
#endif
page = (Page*)Allocator::Allocate(sizeof(Page));
page->Memory = Allocator::Allocate(pageSize);
@@ -51,4 +51,4 @@ void* ArenaAllocator::Allocate(uint64 size, uint64 alignment)
page->Offset += (uint32)size;
return mem;
}
}

View File

@@ -35,7 +35,7 @@ struct GroupNameBuffer
char prev = 0;
for (int32 i = 0; i < max && dst < ARRAY_COUNT(Buffer) - 2; i++)
{
char cur = str[i];
char cur = (char)str[i];
if (autoFormat && StringUtils::IsUpper(cur) && StringUtils::IsLower(prev))
{
Ansi[dst] = '/';
@@ -422,7 +422,7 @@ void ProfilerMemory::OnMemoryAlloc(void* ptr, uint64 size)
// Register pointer
PointerData ptrData;
ptrData.Size = size;
ptrData.Size = (uint32)size;
ptrData.Group = (uint8)stack.Peek();
PointersLocker.Lock();
Pointers[ptr] = ptrData;