Filename & line number args cleanup (#1891)

* Filename & line number args cleanup

* Use int for line number args over s32/u32

* Add missing const qualifiers from filename args

* Fix gcc warning in game.c

* Add comment to weird assignments in GameState_Init
This commit is contained in:
Tharo
2024-02-27 07:37:33 +00:00
committed by GitHub
parent a32221c36e
commit dcf61174e9
17 changed files with 76 additions and 73 deletions
+4 -4
View File
@@ -36,7 +36,7 @@ void* DebugArena_Malloc(u32 size) {
}
#if OOT_DEBUG
void* DebugArena_MallocDebug(u32 size, const char* file, s32 line) {
void* DebugArena_MallocDebug(u32 size, const char* file, int line) {
void* ptr = __osMallocDebug(&sDebugArena, size, file, line);
DEBUG_ARENA_CHECK_POINTER(ptr, size, "debug_malloc_DEBUG", "確保"); // "Secure"
@@ -52,7 +52,7 @@ void* DebugArena_MallocR(u32 size) {
}
#if OOT_DEBUG
void* DebugArena_MallocRDebug(u32 size, const char* file, s32 line) {
void* DebugArena_MallocRDebug(u32 size, const char* file, int line) {
void* ptr = __osMallocRDebug(&sDebugArena, size, file, line);
DEBUG_ARENA_CHECK_POINTER(ptr, size, "debug_malloc_r_DEBUG", "確保"); // "Secure"
@@ -67,7 +67,7 @@ void* DebugArena_Realloc(void* ptr, u32 newSize) {
}
#if OOT_DEBUG
void* DebugArena_ReallocDebug(void* ptr, u32 newSize, const char* file, s32 line) {
void* DebugArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line) {
ptr = __osReallocDebug(&sDebugArena, ptr, newSize, file, line);
DEBUG_ARENA_CHECK_POINTER(ptr, newSize, "debug_realloc_DEBUG", "再確保"); // "Re-securing"
return ptr;
@@ -79,7 +79,7 @@ void DebugArena_Free(void* ptr) {
}
#if OOT_DEBUG
void DebugArena_FreeDebug(void* ptr, const char* file, s32 line) {
void DebugArena_FreeDebug(void* ptr, const char* file, int line) {
__osFreeDebug(&sDebugArena, ptr, file, line);
}
#endif