From 262ddbd72b42dd0673b61cfeeda86c36a4cd98cc Mon Sep 17 00:00:00 2001 From: bonmas14 Date: Thu, 7 Aug 2025 03:04:55 +0300 Subject: Shadowing of global is warning on msvc. i guess it is not a big thing to rename it. --- src/un_memory.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/un_memory.c b/src/un_memory.c index 84f5f14..b092196 100644 --- a/src/un_memory.c +++ b/src/un_memory.c @@ -103,25 +103,25 @@ Allocator un_allocator_get_standard(void) { static struct { u64 index; u8 data[UN_TEMP_SIZE]; -} temp; +} _temp; static void temp_reset(void) { - temp.index = 0; + _temp.index = 0; } static void *temp_alloc(u64 size) { - if ((temp.index + size) > UN_TEMP_SIZE) { + if ((_temp.index + size) > UN_TEMP_SIZE) { // @todo: Decice what is the best behaviour for wrapping assert(false); temp_reset(); } - if ((temp.index + size) > UN_TEMP_SIZE) { + if ((_temp.index + size) > UN_TEMP_SIZE) { return NULL; } - void *ptr = (u8*)temp.data + temp.index; - temp.index += size; + void *ptr = (u8*)_temp.data + _temp.index; + _temp.index += size; un_memory_set(ptr, 0x00, size); return ptr; -- cgit v1.2.3-70-g09d2