gallium: Guard assertions by NDEBUG instead of DEBUG

This matches the standard assert.h header.

Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Michel Dänzer 2017-11-07 10:48:12 +01:00 committed by Michel Dänzer
parent 1e6f9ea212
commit cd3b55ad07

View file

@ -185,7 +185,7 @@ void _debug_assert_fail(const char *expr,
* For non debug builds the assert macro will expand to a no-op, so do not
* call functions with side effects in the assert expression.
*/
#ifdef DEBUG
#ifndef NDEBUG
#define debug_assert(expr) ((expr) ? (void)0 : _debug_assert_fail(#expr, __FILE__, __LINE__, __FUNCTION__))
#else
#define debug_assert(expr) (void)(0 && (expr))