mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
radv: Update radv_assert for MSVC
MSVC hates parentheses in radv_assert, so replace with do/while(0). Also switch nonstandard DEBUG with standard NDEBUG, which Aco uses. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>
This commit is contained in:
parent
02481e1203
commit
be42e9a6d1
1 changed files with 6 additions and 6 deletions
|
|
@ -234,13 +234,13 @@ void radv_logi_v(const char *format, va_list va);
|
|||
} while (0)
|
||||
|
||||
/* A non-fatal assert. Useful for debugging. */
|
||||
#ifdef DEBUG
|
||||
#define radv_assert(x) ({ \
|
||||
if (unlikely(!(x))) \
|
||||
fprintf(stderr, "%s:%d ASSERT: %s\n", __FILE__, __LINE__, #x); \
|
||||
})
|
||||
#else
|
||||
#ifdef NDEBUG
|
||||
#define radv_assert(x) do {} while(0)
|
||||
#else
|
||||
#define radv_assert(x) do { \
|
||||
if (unlikely(!(x))) \
|
||||
fprintf(stderr, "%s:%d ASSERT: %s\n", __FILE__, __LINE__, #x); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#define stub_return(v) \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue