|
|
|
@ -29,14 +29,16 @@
|
|
|
|
|
#define IM_ASSERT(_EXPR) assert(_EXPR)
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// Helpers
|
|
|
|
|
// Some compilers support applying printf-style warnings to user functions.
|
|
|
|
|
#if defined(__clang__) || defined(__GNUC__)
|
|
|
|
|
#define IM_FMTARGS(FMT) __attribute__((format(printf, FMT, FMT+1)))
|
|
|
|
|
#define IM_FMTLIST(FMT) __attribute__((format(printf, FMT, 0)))
|
|
|
|
|
#define IM_FMTARGS(FMT) __attribute__((format(printf, FMT, FMT+1)))
|
|
|
|
|
#define IM_FMTLIST(FMT) __attribute__((format(printf, FMT, 0)))
|
|
|
|
|
#else
|
|
|
|
|
#define IM_FMTARGS(FMT)
|
|
|
|
|
#define IM_FMTLIST(FMT)
|
|
|
|
|
#endif
|
|
|
|
|
#define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR)/sizeof(*_ARR)))
|
|
|
|
|
|
|
|
|
|
#if defined(__clang__)
|
|
|
|
|
#pragma clang diagnostic push
|
|
|
|
|