From 16732def37c5a66f3ea28dbe247b09cc6bca6677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 6 Nov 2020 17:49:09 +0100 Subject: Cleanup: Clang-Tidy modernize-use-nullptr Replace `NULL` with `nullptr` in C++ code. No functional changes. --- source/blender/gpu/opengl/gl_framebuffer.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/gpu/opengl/gl_framebuffer.cc') diff --git a/source/blender/gpu/opengl/gl_framebuffer.cc b/source/blender/gpu/opengl/gl_framebuffer.cc index 661b976771f..cbb332388dc 100644 --- a/source/blender/gpu/opengl/gl_framebuffer.cc +++ b/source/blender/gpu/opengl/gl_framebuffer.cc @@ -72,7 +72,7 @@ GLFrameBuffer::GLFrameBuffer( GLFrameBuffer::~GLFrameBuffer() { - if (context_ == NULL) { + if (context_ == nullptr) { return; } @@ -176,7 +176,7 @@ void GLFrameBuffer::update_attachments() first_attachment = (attach.tex) ? type : first_attachment; } - if (attach.tex == NULL) { + if (attach.tex == nullptr) { glFramebufferTexture(GL_FRAMEBUFFER, gl_attachment, 0, 0); continue; } @@ -208,7 +208,7 @@ void GLFrameBuffer::update_attachments() for (int i = ARRAY_SIZE(gl_attachments_) - 1; i >= 0; --i) { GPUAttachmentType type = GPU_FB_COLOR_ATTACHMENT0 + i; GPUAttachment &attach = attachments_[type]; - if (attach.tex != NULL) { + if (attach.tex != nullptr) { gl_tex = static_cast(unwrap(attach.tex))->tex_id_; } else if (gl_tex != 0) { @@ -232,7 +232,7 @@ void GLFrameBuffer::update_attachments() glDrawBuffers(ARRAY_SIZE(gl_attachments_), gl_attachments_); if (G.debug & G_DEBUG_GPU) { - BLI_assert(this->check(NULL)); + BLI_assert(this->check(nullptr)); } } @@ -410,7 +410,7 @@ void GLFrameBuffer::clear_multi(const float (*clear_cols)[4]) * TODO(fclem): fix this insecurity? */ int type = GPU_FB_COLOR_ATTACHMENT0; for (int i = 0; type < GPU_FB_MAX_ATTACHMENT; i++, type++) { - if (attachments_[type].tex != NULL) { + if (attachments_[type].tex != nullptr) { this->clear_attachment(GPU_FB_COLOR_ATTACHMENT0 + i, GPU_DATA_FLOAT, clear_cols[i]); } } -- cgit v1.2.3