From 91694b9b58ab953f3b313be9389cc1303e472fc2 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Fri, 7 Aug 2020 09:50:34 +0200 Subject: Code Style: use "#pragma once" in source directory This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466 --- source/blender/gpu/GPU_attr_binding.h | 5 +---- source/blender/gpu/GPU_batch.h | 5 +---- source/blender/gpu/GPU_batch_presets.h | 5 +---- source/blender/gpu/GPU_batch_utils.h | 5 +---- source/blender/gpu/GPU_buffers.h | 5 +---- source/blender/gpu/GPU_common.h | 5 +---- source/blender/gpu/GPU_context.h | 5 +---- source/blender/gpu/GPU_debug.h | 5 +---- source/blender/gpu/GPU_draw.h | 5 +---- source/blender/gpu/GPU_element.h | 5 +---- source/blender/gpu/GPU_extensions.h | 5 +---- source/blender/gpu/GPU_framebuffer.h | 5 +---- source/blender/gpu/GPU_glew.h | 5 +---- source/blender/gpu/GPU_immediate.h | 5 +---- source/blender/gpu/GPU_immediate_util.h | 5 +---- source/blender/gpu/GPU_init_exit.h | 5 +---- source/blender/gpu/GPU_legacy_stubs.h | 5 +---- source/blender/gpu/GPU_material.h | 5 +---- source/blender/gpu/GPU_matrix.h | 5 +---- source/blender/gpu/GPU_platform.h | 5 +---- source/blender/gpu/GPU_primitive.h | 5 +---- source/blender/gpu/GPU_select.h | 5 +---- source/blender/gpu/GPU_shader.h | 5 +---- source/blender/gpu/GPU_shader_interface.h | 5 +---- source/blender/gpu/GPU_state.h | 5 +---- source/blender/gpu/GPU_texture.h | 5 +---- source/blender/gpu/GPU_uniformbuffer.h | 5 +---- source/blender/gpu/GPU_vertex_buffer.h | 5 +---- source/blender/gpu/GPU_vertex_format.h | 5 +---- source/blender/gpu/GPU_viewport.h | 5 +---- source/blender/gpu/intern/gpu_attr_binding_private.h | 5 +---- source/blender/gpu/intern/gpu_batch_private.h | 5 +---- source/blender/gpu/intern/gpu_codegen.h | 5 +---- source/blender/gpu/intern/gpu_context_private.h | 5 +---- source/blender/gpu/intern/gpu_material_library.h | 5 +---- source/blender/gpu/intern/gpu_matrix_private.h | 5 +---- source/blender/gpu/intern/gpu_node_graph.h | 5 +---- source/blender/gpu/intern/gpu_primitive_private.h | 5 +---- source/blender/gpu/intern/gpu_private.h | 5 +---- source/blender/gpu/intern/gpu_select_private.h | 5 +---- source/blender/gpu/intern/gpu_shader_private.h | 5 +---- source/blender/gpu/intern/gpu_vertex_format_private.h | 5 +---- 42 files changed, 42 insertions(+), 168 deletions(-) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/GPU_attr_binding.h b/source/blender/gpu/GPU_attr_binding.h index 8093e02cab6..e7c3dcbce05 100644 --- a/source/blender/gpu/GPU_attr_binding.h +++ b/source/blender/gpu/GPU_attr_binding.h @@ -23,8 +23,7 @@ * GPU vertex attribute binding */ -#ifndef __GPU_ATTR_BINDING_H__ -#define __GPU_ATTR_BINDING_H__ +#pragma once #include "GPU_common.h" @@ -42,5 +41,3 @@ typedef struct GPUAttrBinding { #ifdef __cplusplus } #endif - -#endif /* __GPU_ATTR_BINDING_H__ */ diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h index 5f55b512695..ca6aaa90ddc 100644 --- a/source/blender/gpu/GPU_batch.h +++ b/source/blender/gpu/GPU_batch.h @@ -24,8 +24,7 @@ * Contains VAOs + VBOs + Shader representing a drawable entity. */ -#ifndef __GPU_BATCH_H__ -#define __GPU_BATCH_H__ +#pragma once #include "GPU_element.h" #include "GPU_shader.h" @@ -248,5 +247,3 @@ void gpu_batch_exit(void); #ifdef __cplusplus } #endif - -#endif /* __GPU_BATCH_H__ */ diff --git a/source/blender/gpu/GPU_batch_presets.h b/source/blender/gpu/GPU_batch_presets.h index 38de21e7955..1674cf776db 100644 --- a/source/blender/gpu/GPU_batch_presets.h +++ b/source/blender/gpu/GPU_batch_presets.h @@ -24,8 +24,7 @@ * This file contains any additions or modifications specific to Blender. */ -#ifndef __GPU_BATCH_PRESETS_H__ -#define __GPU_BATCH_PRESETS_H__ +#pragma once #include "BLI_compiler_attrs.h" #include "BLI_sys_types.h" @@ -55,5 +54,3 @@ void GPU_batch_presets_reset(void); #ifdef __cplusplus } #endif - -#endif /* __GPU_BATCH_PRESETS_H__ */ diff --git a/source/blender/gpu/GPU_batch_utils.h b/source/blender/gpu/GPU_batch_utils.h index 8f85ac59aa5..37dccc4621c 100644 --- a/source/blender/gpu/GPU_batch_utils.h +++ b/source/blender/gpu/GPU_batch_utils.h @@ -18,8 +18,7 @@ * \ingroup gpu */ -#ifndef __GPU_BATCH_UTILS_H__ -#define __GPU_BATCH_UTILS_H__ +#pragma once #include "BLI_compiler_attrs.h" #include "BLI_sys_types.h" @@ -44,5 +43,3 @@ struct GPUBatch *gpu_batch_sphere(int lat_res, int lon_res) ATTR_WARN_UNUSED_RES #ifdef __cplusplus } #endif - -#endif /* __GPU_BATCH_UTILS_H__ */ diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h index c7e74040568..23349728f25 100644 --- a/source/blender/gpu/GPU_buffers.h +++ b/source/blender/gpu/GPU_buffers.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_BUFFERS_H__ -#define __GPU_BUFFERS_H__ +#pragma once #include @@ -121,5 +120,3 @@ bool GPU_pbvh_buffers_has_overlays(GPU_PBVH_Buffers *buffers); #ifdef __cplusplus } #endif - -#endif diff --git a/source/blender/gpu/GPU_common.h b/source/blender/gpu/GPU_common.h index dd580ebbdac..8fd1baba2f7 100644 --- a/source/blender/gpu/GPU_common.h +++ b/source/blender/gpu/GPU_common.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_COMMON_H__ -#define __GPU_COMMON_H__ +#pragma once #define PROGRAM_NO_OPTI 0 @@ -51,5 +50,3 @@ #else # define GPU_INLINE static inline __attribute__((always_inline)) __attribute__((__unused__)) #endif - -#endif /* __GPU_COMMON_H__ */ diff --git a/source/blender/gpu/GPU_context.h b/source/blender/gpu/GPU_context.h index 6af150b4660..4f0edaf3ac8 100644 --- a/source/blender/gpu/GPU_context.h +++ b/source/blender/gpu/GPU_context.h @@ -23,8 +23,7 @@ * This interface allow GPU to manage VAOs for multiple context and threads. */ -#ifndef __GPU_CONTEXT_H__ -#define __GPU_CONTEXT_H__ +#pragma once #include "GPU_batch.h" #include "GPU_common.h" @@ -53,5 +52,3 @@ void GPU_context_main_unlock(void); #ifdef __cplusplus } #endif - -#endif /* __GPU_CONTEXT_H__ */ diff --git a/source/blender/gpu/GPU_debug.h b/source/blender/gpu/GPU_debug.h index 8928581ee08..282c2437640 100644 --- a/source/blender/gpu/GPU_debug.h +++ b/source/blender/gpu/GPU_debug.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_DEBUG_H__ -#define __GPU_DEBUG_H__ +#pragma once #include "GPU_glew.h" @@ -39,5 +38,3 @@ void GPU_string_marker(const char *str); #ifdef __cplusplus } #endif - -#endif /* __GPU_DEBUG_H__ */ diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h index b364bd0ef95..c0458fec7c3 100644 --- a/source/blender/gpu/GPU_draw.h +++ b/source/blender/gpu/GPU_draw.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_DRAW_H__ -#define __GPU_DRAW_H__ +#pragma once #include "BLI_utildefines.h" #include "DNA_object_enums.h" @@ -91,5 +90,3 @@ void GPU_free_unused_buffers(void); #ifdef __cplusplus } #endif - -#endif diff --git a/source/blender/gpu/GPU_element.h b/source/blender/gpu/GPU_element.h index 9aef8d6ed73..3d5195b12fc 100644 --- a/source/blender/gpu/GPU_element.h +++ b/source/blender/gpu/GPU_element.h @@ -23,8 +23,7 @@ * GPU element list (AKA index buffer) */ -#ifndef __GPU_ELEMENT_H__ -#define __GPU_ELEMENT_H__ +#pragma once #include "GPU_primitive.h" @@ -116,5 +115,3 @@ int GPU_indexbuf_primitive_len(GPUPrimType prim_type); #ifdef __cplusplus } #endif - -#endif /* __GPU_ELEMENT_H__ */ diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h index 4b44ba1b76f..6cb7a297d09 100644 --- a/source/blender/gpu/GPU_extensions.h +++ b/source/blender/gpu/GPU_extensions.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_EXTENSIONS_H__ -#define __GPU_EXTENSIONS_H__ +#pragma once #ifdef __cplusplus extern "C" { @@ -62,5 +61,3 @@ bool GPU_stereo_quadbuffer_support(void); #ifdef __cplusplus } #endif - -#endif /* __GPU_EXTENSIONS_H__ */ diff --git a/source/blender/gpu/GPU_framebuffer.h b/source/blender/gpu/GPU_framebuffer.h index 0a43b2c58a0..4958d1eaac8 100644 --- a/source/blender/gpu/GPU_framebuffer.h +++ b/source/blender/gpu/GPU_framebuffer.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_FRAMEBUFFER_H__ -#define __GPU_FRAMEBUFFER_H__ +#pragma once #include "GPU_texture.h" @@ -235,5 +234,3 @@ void GPU_backbuffer_bind(eGPUBackBuffer buffer); #ifdef __cplusplus } #endif - -#endif /* __GPU_FRAMEBUFFER_H__ */ diff --git a/source/blender/gpu/GPU_glew.h b/source/blender/gpu/GPU_glew.h index 744bce9713a..e87a7054e5f 100644 --- a/source/blender/gpu/GPU_glew.h +++ b/source/blender/gpu/GPU_glew.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_GLEW_H__ -#define __GPU_GLEW_H__ +#pragma once #if defined(WITH_OPENGL) # include "glew-mx.h" @@ -30,5 +29,3 @@ # include "GPU_legacy_stubs.h" # endif #endif - -#endif /* __GPU_GLEW_H__ */ diff --git a/source/blender/gpu/GPU_immediate.h b/source/blender/gpu/GPU_immediate.h index 33880010ef7..08bfcb95942 100644 --- a/source/blender/gpu/GPU_immediate.h +++ b/source/blender/gpu/GPU_immediate.h @@ -23,8 +23,7 @@ * GPU immediate mode work-alike */ -#ifndef __GPU_IMMEDIATE_H__ -#define __GPU_IMMEDIATE_H__ +#pragma once #include "GPU_batch.h" #include "GPU_immediate_util.h" @@ -158,5 +157,3 @@ void immDestroy(void); #ifdef __cplusplus } #endif - -#endif /* __GPU_IMMEDIATE_H__ */ diff --git a/source/blender/gpu/GPU_immediate_util.h b/source/blender/gpu/GPU_immediate_util.h index 47b44b59461..7786bcd2d06 100644 --- a/source/blender/gpu/GPU_immediate_util.h +++ b/source/blender/gpu/GPU_immediate_util.h @@ -20,8 +20,7 @@ * Utility drawing functions (rough equivalent to OpenGL's GLU) */ -#ifndef __GPU_IMMEDIATE_UTIL_H__ -#define __GPU_IMMEDIATE_UTIL_H__ +#pragma once #ifdef __cplusplus extern "C" { @@ -92,5 +91,3 @@ void imm_draw_cylinder_fill_3d( #ifdef __cplusplus } #endif - -#endif /* __GPU_IMMEDIATE_UTIL_H__ */ diff --git a/source/blender/gpu/GPU_init_exit.h b/source/blender/gpu/GPU_init_exit.h index 3e30a1ddcf5..bd4771e2357 100644 --- a/source/blender/gpu/GPU_init_exit.h +++ b/source/blender/gpu/GPU_init_exit.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_INIT_EXIT_H__ -#define __GPU_INIT_EXIT_H__ +#pragma once #include "BLI_utildefines.h" @@ -37,5 +36,3 @@ bool GPU_is_initialized(void); #ifdef __cplusplus } #endif - -#endif /* __GPU_INIT_EXIT_H__ */ diff --git a/source/blender/gpu/GPU_legacy_stubs.h b/source/blender/gpu/GPU_legacy_stubs.h index c666ff73bc6..2e21b879907 100644 --- a/source/blender/gpu/GPU_legacy_stubs.h +++ b/source/blender/gpu/GPU_legacy_stubs.h @@ -26,8 +26,7 @@ * This file should be removed in the future */ -#ifndef __GPU_LEGACY_STUBS_H__ -#define __GPU_LEGACY_STUBS_H__ +#pragma once #if defined(__GNUC__) # pragma GCC diagnostic push @@ -512,5 +511,3 @@ _GL_VOID DO_NOT_USE_glClientActiveTexture(GLenum texture) _GL_VOID_RET #if defined(__GNUC__) # pragma GCC diagnostic pop #endif - -#endif /* __GPU_LEGACY_STUBS_H__ */ diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h index c372bfaf218..b2352b3f3b0 100644 --- a/source/blender/gpu/GPU_material.h +++ b/source/blender/gpu/GPU_material.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_MATERIAL_H__ -#define __GPU_MATERIAL_H__ +#pragma once #include "DNA_customdata_types.h" /* for CustomDataType */ #include "DNA_listBase.h" @@ -255,5 +254,3 @@ ListBase GPU_material_volume_grids(GPUMaterial *material); #ifdef __cplusplus } #endif - -#endif /*__GPU_MATERIAL_H__*/ diff --git a/source/blender/gpu/GPU_matrix.h b/source/blender/gpu/GPU_matrix.h index eabfb5d2dc3..7b94a535a30 100644 --- a/source/blender/gpu/GPU_matrix.h +++ b/source/blender/gpu/GPU_matrix.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_MATRIX_H__ -#define __GPU_MATRIX_H__ +#pragma once #include "BLI_sys_types.h" @@ -236,5 +235,3 @@ int GPU_matrix_stack_level_get_projection(void); * however we need to check these limits in code that calls into these API's. */ #define GPU_MATRIX_ORTHO_CLIP_NEAR_DEFAULT (-100) #define GPU_MATRIX_ORTHO_CLIP_FAR_DEFAULT (100) - -#endif /* __GPU_MATRIX_H__ */ diff --git a/source/blender/gpu/GPU_platform.h b/source/blender/gpu/GPU_platform.h index f199a748cb5..0848252c788 100644 --- a/source/blender/gpu/GPU_platform.h +++ b/source/blender/gpu/GPU_platform.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_PLATFORM_H__ -#define __GPU_PLATFORM_H__ +#pragma once #include "BLI_sys_types.h" @@ -71,5 +70,3 @@ const char *GPU_platform_gpu_name(void); #ifdef __cplusplus } #endif - -#endif /* __GPU_PLATFORM_H__ */ diff --git a/source/blender/gpu/GPU_primitive.h b/source/blender/gpu/GPU_primitive.h index 4cd6205c0d1..e910e81fac1 100644 --- a/source/blender/gpu/GPU_primitive.h +++ b/source/blender/gpu/GPU_primitive.h @@ -23,8 +23,7 @@ * GPU geometric primitives */ -#ifndef __GPU_PRIMITIVE_H__ -#define __GPU_PRIMITIVE_H__ +#pragma once #include "GPU_common.h" @@ -63,5 +62,3 @@ bool GPU_primtype_belongs_to_class(GPUPrimType, GPUPrimClass); #ifdef __cplusplus } #endif - -#endif /* __GPU_PRIMITIVE_H__ */ diff --git a/source/blender/gpu/GPU_select.h b/source/blender/gpu/GPU_select.h index d9a8e964a3d..d28363253b1 100644 --- a/source/blender/gpu/GPU_select.h +++ b/source/blender/gpu/GPU_select.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_SELECT_H__ -#define __GPU_SELECT_H__ +#pragma once #include "BLI_sys_types.h" @@ -63,5 +62,3 @@ void GPU_select_buffer_stride_realign(const struct rcti *src, const struct rcti #ifdef __cplusplus } #endif - -#endif diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h index a19ed2d84fd..1ec70c1106b 100644 --- a/source/blender/gpu/GPU_shader.h +++ b/source/blender/gpu/GPU_shader.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_SHADER_H__ -#define __GPU_SHADER_H__ +#pragma once #ifdef __cplusplus extern "C" { @@ -372,5 +371,3 @@ void GPU_shader_free_builtin_shaders(void); #ifdef __cplusplus } #endif - -#endif /* __GPU_SHADER_H__ */ diff --git a/source/blender/gpu/GPU_shader_interface.h b/source/blender/gpu/GPU_shader_interface.h index 28ee162bdbd..8aba1236b65 100644 --- a/source/blender/gpu/GPU_shader_interface.h +++ b/source/blender/gpu/GPU_shader_interface.h @@ -23,8 +23,7 @@ * GPU shader interface (C --> GLSL) */ -#ifndef __GPU_SHADER_INTERFACE_H__ -#define __GPU_SHADER_INTERFACE_H__ +#pragma once #include "GPU_common.h" @@ -116,5 +115,3 @@ void GPU_shaderinterface_remove_batch_ref(GPUShaderInterface *, struct GPUBatch #ifdef __cplusplus } #endif - -#endif /* __GPU_SHADER_INTERFACE_H__ */ diff --git a/source/blender/gpu/GPU_state.h b/source/blender/gpu/GPU_state.h index 8d50330ac93..4cf1d9844ae 100644 --- a/source/blender/gpu/GPU_state.h +++ b/source/blender/gpu/GPU_state.h @@ -18,8 +18,7 @@ * \ingroup gpu */ -#ifndef __GPU_STATE_H__ -#define __GPU_STATE_H__ +#pragma once #ifdef __cplusplus extern "C" { @@ -108,5 +107,3 @@ void gpuPopAttr(void); #ifdef __cplusplus } #endif - -#endif /* __GPU_STATE_H__ */ diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h index de08391b40c..7cbd4b1eee3 100644 --- a/source/blender/gpu/GPU_texture.h +++ b/source/blender/gpu/GPU_texture.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_TEXTURE_H__ -#define __GPU_TEXTURE_H__ +#pragma once #include "BLI_utildefines.h" #include "GPU_state.h" @@ -301,5 +300,3 @@ void GPU_sampler_icon_bind(int number); #ifdef __cplusplus } #endif - -#endif /* __GPU_TEXTURE_H__ */ diff --git a/source/blender/gpu/GPU_uniformbuffer.h b/source/blender/gpu/GPU_uniformbuffer.h index b221ae035d3..56e258d8a48 100644 --- a/source/blender/gpu/GPU_uniformbuffer.h +++ b/source/blender/gpu/GPU_uniformbuffer.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_UNIFORMBUFFER_H__ -#define __GPU_UNIFORMBUFFER_H__ +#pragma once #ifdef __cplusplus extern "C" { @@ -53,5 +52,3 @@ bool GPU_uniformbuffer_is_dirty(GPUUniformBuffer *ubo); #ifdef __cplusplus } #endif - -#endif /* __GPU_UNIFORMBUFFER_H__ */ diff --git a/source/blender/gpu/GPU_vertex_buffer.h b/source/blender/gpu/GPU_vertex_buffer.h index f9bdf726930..8f194ed2c36 100644 --- a/source/blender/gpu/GPU_vertex_buffer.h +++ b/source/blender/gpu/GPU_vertex_buffer.h @@ -23,8 +23,7 @@ * GPU vertex buffer */ -#ifndef __GPU_VERTEX_BUFFER_H__ -#define __GPU_VERTEX_BUFFER_H__ +#pragma once #include "GPU_vertex_format.h" @@ -147,5 +146,3 @@ uint GPU_vertbuf_get_memory_usage(void); #ifdef __cplusplus } #endif - -#endif /* __GPU_VERTEX_BUFFER_H__ */ diff --git a/source/blender/gpu/GPU_vertex_format.h b/source/blender/gpu/GPU_vertex_format.h index 34bfbb27823..391eaf61876 100644 --- a/source/blender/gpu/GPU_vertex_format.h +++ b/source/blender/gpu/GPU_vertex_format.h @@ -23,8 +23,7 @@ * GPU vertex format */ -#ifndef __GPU_VERTEX_FORMAT_H__ -#define __GPU_VERTEX_FORMAT_H__ +#pragma once #include "BLI_assert.h" #include "BLI_compiler_compat.h" @@ -197,5 +196,3 @@ BLI_INLINE GPUPackedNormal GPU_normal_convert_i10_s3(const short data[3]) #ifdef __cplusplus } #endif - -#endif /* __GPU_VERTEX_FORMAT_H__ */ diff --git a/source/blender/gpu/GPU_viewport.h b/source/blender/gpu/GPU_viewport.h index 878e7e3e9a8..60b78ecd59b 100644 --- a/source/blender/gpu/GPU_viewport.h +++ b/source/blender/gpu/GPU_viewport.h @@ -21,8 +21,7 @@ * \ingroup gpu */ -#ifndef __GPU_VIEWPORT_H__ -#define __GPU_VIEWPORT_H__ +#pragma once #include @@ -159,5 +158,3 @@ struct GPUFrameBuffer *GPU_viewport_framebuffer_overlay_get(GPUViewport *viewpor #ifdef __cplusplus } #endif - -#endif // __GPU_VIEWPORT_H__ diff --git a/source/blender/gpu/intern/gpu_attr_binding_private.h b/source/blender/gpu/intern/gpu_attr_binding_private.h index 301ec3333dd..4f18655ec62 100644 --- a/source/blender/gpu/intern/gpu_attr_binding_private.h +++ b/source/blender/gpu/intern/gpu_attr_binding_private.h @@ -23,8 +23,7 @@ * GPU vertex attribute binding */ -#ifndef __GPU_ATTR_BINDING_PRIVATE_H__ -#define __GPU_ATTR_BINDING_PRIVATE_H__ +#pragma once #include "GPU_shader_interface.h" #include "GPU_vertex_format.h" @@ -35,5 +34,3 @@ void get_attr_locations(const GPUVertFormat *format, GPUAttrBinding *binding, const GPUShaderInterface *shaderface); uint read_attr_location(const GPUAttrBinding *binding, uint a_idx); - -#endif /* __GPU_ATTR_BINDING_PRIVATE_H__ */ diff --git a/source/blender/gpu/intern/gpu_batch_private.h b/source/blender/gpu/intern/gpu_batch_private.h index 58d1810ac7a..93745b9ca9b 100644 --- a/source/blender/gpu/intern/gpu_batch_private.h +++ b/source/blender/gpu/intern/gpu_batch_private.h @@ -24,8 +24,7 @@ * Contains VAOs + VBOs + Shader representing a drawable entity. */ -#ifndef __GPU_BATCH_PRIVATE_H__ -#define __GPU_BATCH_PRIVATE_H__ +#pragma once #include "GPU_batch.h" #include "GPU_context.h" @@ -40,5 +39,3 @@ void gpu_batch_remove_interface_ref(GPUBatch *batch, const GPUShaderInterface *i #ifdef __cplusplus } #endif - -#endif /* __GPU_BATCH_PRIVATE_H__ */ diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h index e12e0c0ba08..1454edeb1e0 100644 --- a/source/blender/gpu/intern/gpu_codegen.h +++ b/source/blender/gpu/intern/gpu_codegen.h @@ -23,8 +23,7 @@ * Generate shader code from the intermediate node graph. */ -#ifndef __GPU_CODEGEN_H__ -#define __GPU_CODEGEN_H__ +#pragma once struct GPUMaterial; struct GPUNodeGraph; @@ -62,5 +61,3 @@ void GPU_pass_release(GPUPass *pass); void gpu_codegen_init(void); void gpu_codegen_exit(void); - -#endif /* __GPU_CODEGEN_H__ */ diff --git a/source/blender/gpu/intern/gpu_context_private.h b/source/blender/gpu/intern/gpu_context_private.h index f64cdf439a1..08fbefe3b3f 100644 --- a/source/blender/gpu/intern/gpu_context_private.h +++ b/source/blender/gpu/intern/gpu_context_private.h @@ -23,8 +23,7 @@ * This interface allow GPU to manage GL objects for multiple context and threads. */ -#ifndef __GPU_CONTEXT_PRIVATE_H__ -#define __GPU_CONTEXT_PRIVATE_H__ +#pragma once #include "GPU_context.h" @@ -64,5 +63,3 @@ struct GPUMatrixState *gpu_context_active_matrix_state_get(void); #ifdef __cplusplus } #endif - -#endif /* __GPU_CONTEXT_PRIVATE_H__ */ diff --git a/source/blender/gpu/intern/gpu_material_library.h b/source/blender/gpu/intern/gpu_material_library.h index f69c25b9490..da7b1636fa3 100644 --- a/source/blender/gpu/intern/gpu_material_library.h +++ b/source/blender/gpu/intern/gpu_material_library.h @@ -22,8 +22,7 @@ * * Parsing of and code generation using GLSL shaders in gpu/shaders/material. */ -#ifndef __GPU_MATERIAL_LIBRARY_H__ -#define __GPU_MATERIAL_LIBRARY_H__ +#pragma once #include "GPU_material.h" @@ -65,5 +64,3 @@ char *gpu_material_library_generate_code(struct GSet *used_libraries, const char char *gpu_str_skip_token(char *str, char *token, int max); const char *gpu_data_type_to_string(const eGPUType type); - -#endif /* __ __GPU_MATERIAL_LIBRARY_H__ */ diff --git a/source/blender/gpu/intern/gpu_matrix_private.h b/source/blender/gpu/intern/gpu_matrix_private.h index 862ef065481..3448b0a95aa 100644 --- a/source/blender/gpu/intern/gpu_matrix_private.h +++ b/source/blender/gpu/intern/gpu_matrix_private.h @@ -18,8 +18,7 @@ * \ingroup gpu */ -#ifndef __GPU_MATRIX_PRIVATE_H__ -#define __GPU_MATRIX_PRIVATE_H__ +#pragma once #ifdef __cplusplus extern "C" { @@ -31,5 +30,3 @@ void GPU_matrix_state_discard(struct GPUMatrixState *state); #ifdef __cplusplus } #endif - -#endif /* __GPU_MATRIX_PRIVATE_H__ */ diff --git a/source/blender/gpu/intern/gpu_node_graph.h b/source/blender/gpu/intern/gpu_node_graph.h index bf59b720cff..21bb139f610 100644 --- a/source/blender/gpu/intern/gpu_node_graph.h +++ b/source/blender/gpu/intern/gpu_node_graph.h @@ -23,8 +23,7 @@ * Intermediate node graph for generating GLSL shaders. */ -#ifndef __GPU_NODE_GRAPH_H__ -#define __GPU_NODE_GRAPH_H__ +#pragma once #include "DNA_customdata_types.h" #include "DNA_listBase.h" @@ -165,5 +164,3 @@ struct GPUTexture **gpu_material_ramp_texture_row_set(struct GPUMaterial *mat, float *row); struct GSet *gpu_material_used_libraries(struct GPUMaterial *material); - -#endif /* __GPU_NODE_GRAPH_H__ */ diff --git a/source/blender/gpu/intern/gpu_primitive_private.h b/source/blender/gpu/intern/gpu_primitive_private.h index abefa6abd20..b3b6bd7fc88 100644 --- a/source/blender/gpu/intern/gpu_primitive_private.h +++ b/source/blender/gpu/intern/gpu_primitive_private.h @@ -23,9 +23,6 @@ * GPU geometric primitives */ -#ifndef __GPU_PRIMITIVE_PRIVATE_H__ -#define __GPU_PRIMITIVE_PRIVATE_H__ +#pragma once GLenum convert_prim_type_to_gl(GPUPrimType); - -#endif /* __GPU_PRIMITIVE_PRIVATE_H__ */ diff --git a/source/blender/gpu/intern/gpu_private.h b/source/blender/gpu/intern/gpu_private.h index 7846bff87f4..a5caa816ef4 100644 --- a/source/blender/gpu/intern/gpu_private.h +++ b/source/blender/gpu/intern/gpu_private.h @@ -18,8 +18,7 @@ * \ingroup gpu */ -#ifndef __GPU_PRIVATE_H__ -#define __GPU_PRIVATE_H__ +#pragma once /* call this before running any of the functions below */ void gpu_platform_init(void); @@ -40,5 +39,3 @@ void gpu_framebuffer_module_exit(void); /* gpu_pbvh.c */ void gpu_pbvh_init(void); void gpu_pbvh_exit(void); - -#endif /* __GPU_PRIVATE_H__ */ diff --git a/source/blender/gpu/intern/gpu_select_private.h b/source/blender/gpu/intern/gpu_select_private.h index a0619bd4293..e364b78bff2 100644 --- a/source/blender/gpu/intern/gpu_select_private.h +++ b/source/blender/gpu/intern/gpu_select_private.h @@ -23,8 +23,7 @@ * Selection implementations. */ -#ifndef __GPU_SELECT_PRIVATE_H__ -#define __GPU_SELECT_PRIVATE_H__ +#pragma once /* gpu_select_pick */ void gpu_select_pick_begin(uint (*buffer)[4], uint bufsize, const rcti *input, char mode); @@ -43,5 +42,3 @@ bool gpu_select_query_load_id(uint id); uint gpu_select_query_end(void); #define SELECT_ID_NONE ((uint)0xffffffff) - -#endif /* __GPU_SELECT_PRIVATE_H__ */ diff --git a/source/blender/gpu/intern/gpu_shader_private.h b/source/blender/gpu/intern/gpu_shader_private.h index e4443e79a8d..e04d8655421 100644 --- a/source/blender/gpu/intern/gpu_shader_private.h +++ b/source/blender/gpu/intern/gpu_shader_private.h @@ -18,8 +18,7 @@ * \ingroup gpu */ -#ifndef __GPU_SHADER_PRIVATE_H__ -#define __GPU_SHADER_PRIVATE_H__ +#pragma once #include "GPU_glew.h" #include "GPU_shader_interface.h" @@ -46,5 +45,3 @@ struct GPUShader { /* XXX do not use it. Special hack to use OCIO with batch API. */ void immGetProgram(GLuint *program, GPUShaderInterface **shaderface); - -#endif /* __GPU_SHADER_PRIVATE_H__ */ diff --git a/source/blender/gpu/intern/gpu_vertex_format_private.h b/source/blender/gpu/intern/gpu_vertex_format_private.h index a850d17a1dd..a80c085b44a 100644 --- a/source/blender/gpu/intern/gpu_vertex_format_private.h +++ b/source/blender/gpu/intern/gpu_vertex_format_private.h @@ -23,11 +23,8 @@ * GPU vertex format */ -#ifndef __GPU_VERTEX_FORMAT_PRIVATE_H__ -#define __GPU_VERTEX_FORMAT_PRIVATE_H__ +#pragma once void VertexFormat_pack(GPUVertFormat *format); uint padding(uint offset, uint alignment); uint vertex_buffer_size(const GPUVertFormat *format, uint vertex_len); - -#endif /* __GPU_VERTEX_FORMAT_PRIVATE_H__ */ -- cgit v1.2.3