Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-09-07 03:12:59 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-07 14:59:51 +0300
commitaa32e7a2f31486503edb430b15ce31a819e02702 (patch)
treeff9c0962fc263a631882a67575b1a87e2ee6a612 /source/blender/gpu/GPU_vertex_buffer.h
parentc38debd39fac1e3d44b84e8092419da34f0b613d (diff)
Cleanup: GPUVertBuf: Replace TRUST_NO_ONE by BLI_asserts and ifdef DEBUG
Diffstat (limited to 'source/blender/gpu/GPU_vertex_buffer.h')
-rw-r--r--source/blender/gpu/GPU_vertex_buffer.h6
1 files changed, 2 insertions, 4 deletions
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;
}