From 9bdeb2d7939e17357f16b27ce605e07da84f307e Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Tue, 3 Jun 2025 19:17:09 -0700 Subject: [PATCH] mcpx: Add inline keyword to float conversion helpers --- hw/xbox/mcpx/fpconv.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/xbox/mcpx/fpconv.h b/hw/xbox/mcpx/fpconv.h index fd6b9442f0..fd2fadc587 100644 --- a/hw/xbox/mcpx/fpconv.h +++ b/hw/xbox/mcpx/fpconv.h @@ -23,37 +23,37 @@ #include -static float int8_to_float(int8_t x) +static inline float int8_to_float(int8_t x) { return x / 128.0f; } -static float uint8_to_float(uint8_t value) +static inline float uint8_to_float(uint8_t value) { return ((int)value - 0x80) / (1.0 * 0x80); } -static float int16_to_float(int16_t value) +static inline float int16_to_float(int16_t value) { return value / (1.0 * 0x8000); } -static float s6p9_to_float(int16_t value) +static inline float s6p9_to_float(int16_t value) { return value / 512.0f; } -static float int32_to_float(int32_t value) +static inline float int32_to_float(int32_t value) { return value / (1.0 * 0x80000000); } -static float int24_to_float(int32_t value) +static inline float int24_to_float(int32_t value) { return int32_to_float((uint32_t)value << 8); } -static uint32_t float_to_24b(float value) +static inline uint32_t float_to_24b(float value) { double scaled_value = value * (8.0 * 0x100000); int int24;