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/intern/gpu_context.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/gpu/intern/gpu_context.cc') diff --git a/source/blender/gpu/intern/gpu_context.cc b/source/blender/gpu/intern/gpu_context.cc index 3ebfd80241d..a9d32dcf297 100644 --- a/source/blender/gpu/intern/gpu_context.cc +++ b/source/blender/gpu/intern/gpu_context.cc @@ -54,7 +54,7 @@ using namespace blender::gpu; -static thread_local Context *active_ctx = NULL; +static thread_local Context *active_ctx = nullptr; /* -------------------------------------------------------------------- */ /** \name gpu::Context methods @@ -98,7 +98,7 @@ Context *Context::get() GPUContext *GPU_context_create(void *ghost_window) { - if (GPUBackend::get() == NULL) { + if (GPUBackend::get() == nullptr) { /* TODO move where it make sense. */ GPU_backend_init(GPU_BACKEND_OPENGL); } @@ -114,7 +114,7 @@ void GPU_context_discard(GPUContext *ctx_) { Context *ctx = unwrap(ctx_); delete ctx; - active_ctx = NULL; + active_ctx = nullptr; } /* ctx can be NULL */ @@ -166,7 +166,7 @@ static GPUBackend *g_backend; void GPU_backend_init(eGPUBackendType backend_type) { - BLI_assert(g_backend == NULL); + BLI_assert(g_backend == nullptr); switch (backend_type) { #if WITH_OPENGL_BACKEND @@ -185,7 +185,7 @@ void GPU_backend_exit(void) /* TODO assert no resource left. Currently UI textures are still not freed in their context * correctly. */ delete g_backend; - g_backend = NULL; + g_backend = nullptr; } GPUBackend *GPUBackend::get() -- cgit v1.2.3