diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-11-06 19:49:09 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-11-06 20:08:25 +0300 |
commit | 16732def37c5a66f3ea28dbe247b09cc6bca6677 (patch) | |
tree | 5d14f5c920a1411e336bd80b12becbb3f73de19a /source/blender/gpu/intern/gpu_vertex_buffer.cc | |
parent | 88926375a0e4e45f72c87b9e487c060ddd3c9216 (diff) |
Cleanup: Clang-Tidy modernize-use-nullptr
Replace `NULL` with `nullptr` in C++ code.
No functional changes.
Diffstat (limited to 'source/blender/gpu/intern/gpu_vertex_buffer.cc')
-rw-r--r-- | source/blender/gpu/intern/gpu_vertex_buffer.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_vertex_buffer.cc b/source/blender/gpu/intern/gpu_vertex_buffer.cc index be66d91b025..09b9eba9f95 100644 --- a/source/blender/gpu/intern/gpu_vertex_buffer.cc +++ b/source/blender/gpu/intern/gpu_vertex_buffer.cc @@ -191,7 +191,7 @@ void GPU_vertbuf_data_resize(GPUVertBuf *verts, uint v_len) void GPU_vertbuf_data_len_set(GPUVertBuf *verts_, uint v_len) { VertBuf *verts = unwrap(verts_); - BLI_assert(verts->data != NULL); /* Only for dynamic data. */ + BLI_assert(verts->data != nullptr); /* Only for dynamic data. */ BLI_assert(v_len <= verts->vertex_alloc); verts->vertex_len = v_len; } @@ -203,7 +203,7 @@ void GPU_vertbuf_attr_set(GPUVertBuf *verts_, uint a_idx, uint v_idx, const void const GPUVertAttr *a = &format->attrs[a_idx]; BLI_assert(v_idx < verts->vertex_alloc); BLI_assert(a_idx < format->attr_len); - BLI_assert(verts->data != NULL); + BLI_assert(verts->data != nullptr); verts->flag |= GPU_VERTBUF_DATA_DIRTY; memcpy(verts->data + a->offset + v_idx * format->stride, data, a->sz); } @@ -225,7 +225,7 @@ void GPU_vertbuf_vert_set(GPUVertBuf *verts_, uint v_idx, const void *data) VertBuf *verts = unwrap(verts_); const GPUVertFormat *format = &verts->format; BLI_assert(v_idx < verts->vertex_alloc); - BLI_assert(verts->data != NULL); + BLI_assert(verts->data != nullptr); verts->flag |= GPU_VERTBUF_DATA_DIRTY; memcpy(verts->data + v_idx * format->stride, data, format->stride); } @@ -236,7 +236,7 @@ void GPU_vertbuf_attr_fill_stride(GPUVertBuf *verts_, uint a_idx, uint stride, c const GPUVertFormat *format = &verts->format; const GPUVertAttr *a = &format->attrs[a_idx]; BLI_assert(a_idx < format->attr_len); - BLI_assert(verts->data != NULL); + BLI_assert(verts->data != nullptr); verts->flag |= GPU_VERTBUF_DATA_DIRTY; const uint vertex_len = verts->vertex_len; @@ -259,7 +259,7 @@ void GPU_vertbuf_attr_get_raw_data(GPUVertBuf *verts_, uint a_idx, GPUVertBufRaw const GPUVertFormat *format = &verts->format; const GPUVertAttr *a = &format->attrs[a_idx]; BLI_assert(a_idx < format->attr_len); - BLI_assert(verts->data != NULL); + BLI_assert(verts->data != nullptr); verts->flag |= GPU_VERTBUF_DATA_DIRTY; verts->flag &= ~GPU_VERTBUF_DATA_UPLOADED; |