From 75a4872c90fb809fdb1df9a6270df940dcf97c44 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 18 Nov 2020 12:43:33 +1100 Subject: Cleanup: declare original function storage variables static Also minor comment formatting changes. --- source/blender/gpu/opengl/gl_debug_layer.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/opengl/gl_debug_layer.cc b/source/blender/gpu/opengl/gl_debug_layer.cc index 188083b0f50..9c2b6c0e547 100644 --- a/source/blender/gpu/opengl/gl_debug_layer.cc +++ b/source/blender/gpu/opengl/gl_debug_layer.cc @@ -42,7 +42,7 @@ typedef void *GPUvoidptr; #define void_ret #define DEBUG_FUNC_DECLARE(pfn, rtn_type, fn, ...) \ - pfn real_##fn; \ + static pfn real_##fn; \ static rtn_type GLAPIENTRY debug_##fn(ARG_LIST(__VA_ARGS__)) \ { \ debug::check_gl_error("generated before " #fn); \ @@ -54,7 +54,7 @@ typedef void *GPUvoidptr; namespace blender::gpu::debug { /* List of wrapped functions. We dont have to support all of them. - * Some functions might be declared as extern in GLEW. We cannot override them in this case. + * Some functions might be declared as `extern` in GLEW. We cannot override them in this case. * Keep the list in alphabetical order. */ /* Avoid very long declarations. */ @@ -105,9 +105,11 @@ DEBUG_FUNC_DECLARE(PFNGLUSEPROGRAMPROC, void, glUseProgram, GLuint, program); #undef DEBUG_FUNC_DECLARE -/* Init a fallback layer (to KHR_debug) that covers only some functions. - * We override the functions pointers by our own implementation that just checks glGetError. - * Some additional functions (not overridable) are covered inside the header using wrappers. */ +/** + * Initialize a fallback layer (to KHR_debug) that covers only some functions. + * We override the functions pointers by our own implementation that just checks #glGetError. + * Some additional functions (not overridable) are covered inside the header using wrappers. + */ void init_debug_layer() { #define DEBUG_WRAP(function) \ -- cgit v1.2.3