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/opengl/gl_immediate.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/opengl/gl_immediate.cc')
-rw-r--r-- | source/blender/gpu/opengl/gl_immediate.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/gpu/opengl/gl_immediate.cc b/source/blender/gpu/opengl/gl_immediate.cc index 4350902de73..63e3162944d 100644 --- a/source/blender/gpu/opengl/gl_immediate.cc +++ b/source/blender/gpu/opengl/gl_immediate.cc @@ -50,12 +50,12 @@ GLImmediate::GLImmediate() buffer.buffer_size = DEFAULT_INTERNAL_BUFFER_SIZE; glGenBuffers(1, &buffer.vbo_id); glBindBuffer(GL_ARRAY_BUFFER, buffer.vbo_id); - glBufferData(GL_ARRAY_BUFFER, buffer.buffer_size, NULL, GL_DYNAMIC_DRAW); + glBufferData(GL_ARRAY_BUFFER, buffer.buffer_size, nullptr, GL_DYNAMIC_DRAW); buffer_strict.buffer_size = DEFAULT_INTERNAL_BUFFER_SIZE; glGenBuffers(1, &buffer_strict.vbo_id); glBindBuffer(GL_ARRAY_BUFFER, buffer_strict.vbo_id); - glBufferData(GL_ARRAY_BUFFER, buffer_strict.buffer_size, NULL, GL_DYNAMIC_DRAW); + glBufferData(GL_ARRAY_BUFFER, buffer_strict.buffer_size, nullptr, GL_DYNAMIC_DRAW); glBindBuffer(GL_ARRAY_BUFFER, 0); glBindVertexArray(0); @@ -112,7 +112,7 @@ uchar *GLImmediate::begin() } else { /* orphan this buffer & start with a fresh one */ - glBufferData(GL_ARRAY_BUFFER, buffer_size(), NULL, GL_DYNAMIC_DRAW); + glBufferData(GL_ARRAY_BUFFER, buffer_size(), nullptr, GL_DYNAMIC_DRAW); buffer_offset() = 0; } @@ -129,7 +129,7 @@ uchar *GLImmediate::begin() access |= GL_MAP_FLUSH_EXPLICIT_BIT; } void *data = glMapBufferRange(GL_ARRAY_BUFFER, buffer_offset(), bytes_needed, access); - BLI_assert(data != NULL); + BLI_assert(data != nullptr); bytes_mapped_ = bytes_needed; return (uchar *)data; |