1
0
Fork 0

Annotate auto_free with 'inline' to prevent redefinition

This way we prevent unused function warning coming from some files
including this header.
This commit is contained in:
Patryk Obara 2020-02-05 06:20:06 +01:00 committed by Patryk Obara
parent f5bf769522
commit a7a9f84ae2

View file

@ -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<t*>( calloc(1, sizeof(t) ) )
#endif