Fix compilation warnings
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user