mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Added macros for handling unused variables.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
# define BX_FUNCTION __PRETTY_FUNCTION__
|
||||
# define BX_NO_INLINE __attribute__( (noinline) )
|
||||
# define BX_FORCE_INLINE __extension__ static __inline __attribute__( (__always_inline__) )
|
||||
# define BX_ALLOW_UNUSED __attribute__( (unused) )
|
||||
# if BX_COMPILER_CLANG
|
||||
# define BX_THREAD /* not supported right now */
|
||||
# else
|
||||
@@ -40,6 +41,7 @@
|
||||
# define BX_NO_INLINE __declspec(noinline)
|
||||
# define BX_FORCE_INLINE __forceinline
|
||||
# define BX_THREAD __declspec(thread)
|
||||
# define BX_ALLOW_UNUSED
|
||||
#else
|
||||
# error "Unknown BX_COMPILER_?"
|
||||
#endif
|
||||
@@ -47,6 +49,8 @@
|
||||
#define BX_ALIGN_STRUCT_16(_struct) BX_ALIGN_STRUCT(16, _struct)
|
||||
#define BX_ALIGN_STRUCT_256(_struct) BX_ALIGN_STRUCT(256, _struct)
|
||||
|
||||
#define BX_UNUSED(_unused) do { (void)sizeof(_unused); } while(0)
|
||||
|
||||
#ifndef BX_CHECK
|
||||
# define BX_CHECK(...) do {} while(0)
|
||||
#endif // BX_CHECK
|
||||
|
||||
Reference in New Issue
Block a user