From 0549f9326f41c55ae2c14f91c948fd90061b096a Mon Sep 17 00:00:00 2001 From: RocketRobz Date: Sat, 25 Nov 2023 20:40:46 -0700 Subject: [PATCH] Inline `dbg_hexa` --- hb/common/include/debug_file.h | 7 +++++-- hb/common/source/debug_file.c | 5 ----- retail/common/include_fat/debug_file.h | 5 ++++- retail/common/source/debug_file.c | 5 ----- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/hb/common/include/debug_file.h b/hb/common/include/debug_file.h index 29dbf689e..4660cd87b 100644 --- a/hb/common/include/debug_file.h +++ b/hb/common/include/debug_file.h @@ -20,9 +20,12 @@ #define DEBUG_FILE_H #include "my_fat.h" +#include "hex.h" u32 dbg_printf(const char* message); -u32 dbg_hexa(u32 n); -void enableDebug(aFile debugFileCluster); +static inline u32 dbg_hexa(u32 n) { + return dbg_printf(tohex(n)); +} +void enableDebug(const aFile* debugFileCluster); #endif // DEBUG_FILE_H diff --git a/hb/common/source/debug_file.c b/hb/common/source/debug_file.c index d409c00ea..cd85ecd2e 100644 --- a/hb/common/source/debug_file.c +++ b/hb/common/source/debug_file.c @@ -21,7 +21,6 @@ #include #include #include "my_fat.h" -#include "hex.h" static bool _debug = false; static aFile _debugFileCluster; @@ -46,8 +45,4 @@ u32 dbg_printf(const char* message) { return ret; } -u32 dbg_hexa(u32 n) { - return dbg_printf(tohex(n)); -} - #endif \ No newline at end of file diff --git a/retail/common/include_fat/debug_file.h b/retail/common/include_fat/debug_file.h index cd683b4c7..4660cd87b 100644 --- a/retail/common/include_fat/debug_file.h +++ b/retail/common/include_fat/debug_file.h @@ -20,9 +20,12 @@ #define DEBUG_FILE_H #include "my_fat.h" +#include "hex.h" u32 dbg_printf(const char* message); -u32 dbg_hexa(u32 n); +static inline u32 dbg_hexa(u32 n) { + return dbg_printf(tohex(n)); +} void enableDebug(const aFile* debugFileCluster); #endif // DEBUG_FILE_H diff --git a/retail/common/source/debug_file.c b/retail/common/source/debug_file.c index 650939dae..da9c85e6f 100644 --- a/retail/common/source/debug_file.c +++ b/retail/common/source/debug_file.c @@ -19,7 +19,6 @@ #include #include #include "my_fat.h" -#include "hex.h" static bool _debug = false; static aFile _debugFileCluster; @@ -45,7 +44,3 @@ u32 dbg_printf(const char* message) { return ret; } - -u32 dbg_hexa(u32 n) { - return dbg_printf(tohex(n)); -}