From a7a9f84ae2f1626ea4331e89b0a151f6a8231d81 Mon Sep 17 00:00:00 2001 From: Patryk Obara Date: Wed, 5 Feb 2020 06:20:06 +0100 Subject: [PATCH] Annotate auto_free with 'inline' to prevent redefinition This way we prevent unused function warning coming from some files including this header. --- src/hardware/mame/emu.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/hardware/mame/emu.h b/src/hardware/mame/emu.h index dfacd66b..268148d1 100644 --- a/src/hardware/mame/emu.h +++ b/src/hardware/mame/emu.h @@ -127,16 +127,11 @@ public: } }; - - -static void auto_free(const device_t::machine_t& machine, void * buffer) { +static inline void auto_free(const device_t::machine_t& machine, void * buffer) { free(buffer); } #define auto_alloc_array_clear(m, t, c) calloc(c, sizeof(t) ) #define auto_alloc_clear(m, t) static_cast( calloc(1, sizeof(t) ) ) - - - #endif