From aa32e7a2f31486503edb430b15ce31a819e02702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 7 Sep 2020 02:12:59 +0200 Subject: Cleanup: GPUVertBuf: Replace TRUST_NO_ONE by BLI_asserts and ifdef DEBUG --- source/blender/gpu/GPU_vertex_buffer.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source/blender/gpu/GPU_vertex_buffer.h') diff --git a/source/blender/gpu/GPU_vertex_buffer.h b/source/blender/gpu/GPU_vertex_buffer.h index e42d6c47b58..80f0501edc0 100644 --- a/source/blender/gpu/GPU_vertex_buffer.h +++ b/source/blender/gpu/GPU_vertex_buffer.h @@ -107,7 +107,7 @@ typedef struct GPUVertBufRaw { uint stride; unsigned char *data; unsigned char *data_init; -#if TRUST_NO_ONE +#ifdef DEBUG /* Only for overflow check */ unsigned char *_data_end; #endif @@ -117,9 +117,7 @@ GPU_INLINE void *GPU_vertbuf_raw_step(GPUVertBufRaw *a) { unsigned char *data = a->data; a->data += a->stride; -#if TRUST_NO_ONE - assert(data < a->_data_end); -#endif + BLI_assert(data < a->_data_end); return (void *)data; } -- cgit v1.2.3