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/blenkernel/intern/CCGSubSurf.h | 5 +---- source/blender/blenkernel/intern/CCGSubSurf_inline.h | 5 +---- source/blender/blenkernel/intern/CCGSubSurf_intern.h | 5 +---- source/blender/blenkernel/intern/data_transfer_intern.h | 5 +---- source/blender/blenkernel/intern/lib_intern.h | 5 +---- source/blender/blenkernel/intern/multires_inline.h | 5 +---- source/blender/blenkernel/intern/multires_reshape.h | 4 +--- source/blender/blenkernel/intern/multires_unsubdivide.h | 5 +---- source/blender/blenkernel/intern/ocean_intern.h | 5 +---- source/blender/blenkernel/intern/pbvh_intern.h | 5 +---- source/blender/blenkernel/intern/subdiv_converter.h | 5 +---- source/blender/blenkernel/intern/subdiv_inline.h | 5 +---- 12 files changed, 12 insertions(+), 47 deletions(-) (limited to 'source/blender/blenkernel/intern') diff --git a/source/blender/blenkernel/intern/CCGSubSurf.h b/source/blender/blenkernel/intern/CCGSubSurf.h index 2e5100db6de..e1805a9c512 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf.h +++ b/source/blender/blenkernel/intern/CCGSubSurf.h @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __CCGSUBSURF_H__ -#define __CCGSUBSURF_H__ +#pragma once /** \file * \ingroup bke @@ -210,5 +209,3 @@ void ccgEdgeIterator_next(CCGEdgeIterator *ei); CCGFace *ccgFaceIterator_getCurrent(CCGFaceIterator *fi); int ccgFaceIterator_isStopped(CCGFaceIterator *fi); void ccgFaceIterator_next(CCGFaceIterator *fi); - -#endif /* __CCGSUBSURF_H__ */ diff --git a/source/blender/blenkernel/intern/CCGSubSurf_inline.h b/source/blender/blenkernel/intern/CCGSubSurf_inline.h index 86012bd2a43..8aa1fede57d 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf_inline.h +++ b/source/blender/blenkernel/intern/CCGSubSurf_inline.h @@ -18,8 +18,7 @@ * \ingroup bke */ -#ifndef __CCGSUBSURF_INLINE_H__ -#define __CCGSUBSURF_INLINE_H__ +#pragma once BLI_INLINE int ccg_gridsize(int level) { @@ -274,5 +273,3 @@ BLI_INLINE void VertDataAvg4(float v[], v[i] = (a[i] + b[i] + c[i] + d[i]) * 0.25f; } } - -#endif /* __CCGSUBSURF_INLINE_H__ */ diff --git a/source/blender/blenkernel/intern/CCGSubSurf_intern.h b/source/blender/blenkernel/intern/CCGSubSurf_intern.h index 7c35d2ccfce..82ca22e193a 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf_intern.h +++ b/source/blender/blenkernel/intern/CCGSubSurf_intern.h @@ -18,8 +18,7 @@ * \ingroup bke */ -#ifndef __CCGSUBSURF_INTERN_H__ -#define __CCGSUBSURF_INTERN_H__ +#pragma once /** * Definitions which defines internal behavior of CCGSubSurf. @@ -286,5 +285,3 @@ void ccgSubSurf__dumpCoords(CCGSubSurf *ss); #endif #include "CCGSubSurf_inline.h" - -#endif /* __CCGSUBSURF_INTERN_H__ */ diff --git a/source/blender/blenkernel/intern/data_transfer_intern.h b/source/blender/blenkernel/intern/data_transfer_intern.h index 68ded6e2bc4..c5d7dd42cb8 100644 --- a/source/blender/blenkernel/intern/data_transfer_intern.h +++ b/source/blender/blenkernel/intern/data_transfer_intern.h @@ -21,8 +21,7 @@ * \ingroup bke */ -#ifndef __DATA_TRANSFER_INTERN_H__ -#define __DATA_TRANSFER_INTERN_H__ +#pragma once #include "BKE_customdata.h" /* For cd_datatransfer_interp */ @@ -75,5 +74,3 @@ void customdata_data_transfer_interp_normal_normals(const CustomDataTransferLaye const float *weights, const int count, const float mix_factor); - -#endif /* __DATA_TRANSFER_INTERN_H__ */ diff --git a/source/blender/blenkernel/intern/lib_intern.h b/source/blender/blenkernel/intern/lib_intern.h index 9cc5db64d17..7305785573b 100644 --- a/source/blender/blenkernel/intern/lib_intern.h +++ b/source/blender/blenkernel/intern/lib_intern.h @@ -21,11 +21,8 @@ * \ingroup bke */ -#ifndef __LIB_INTERN_H__ -#define __LIB_INTERN_H__ +#pragma once extern BKE_library_free_notifier_reference_cb free_notifier_reference_cb; extern BKE_library_remap_editor_id_reference_cb remap_editor_id_reference_cb; - -#endif /* __LIB_INTERN_H__ */ diff --git a/source/blender/blenkernel/intern/multires_inline.h b/source/blender/blenkernel/intern/multires_inline.h index 3d00101ec29..49329698b3a 100644 --- a/source/blender/blenkernel/intern/multires_inline.h +++ b/source/blender/blenkernel/intern/multires_inline.h @@ -21,8 +21,7 @@ * \ingroup bke */ -#ifndef __MULTIRES_INLINE_H__ -#define __MULTIRES_INLINE_H__ +#pragma once #include "BKE_multires.h" #include "BLI_math_vector.h" @@ -57,5 +56,3 @@ BLI_INLINE void BKE_multires_construct_tangent_matrix(float tangent_matrix[3][3] normalize_v3(tangent_matrix[1]); normalize_v3(tangent_matrix[2]); } - -#endif /* __MULTIRES_INLINE_H__ */ diff --git a/source/blender/blenkernel/intern/multires_reshape.h b/source/blender/blenkernel/intern/multires_reshape.h index 12816a455ee..d6c1d79dfd7 100644 --- a/source/blender/blenkernel/intern/multires_reshape.h +++ b/source/blender/blenkernel/intern/multires_reshape.h @@ -21,8 +21,7 @@ * \ingroup bke */ -#ifndef __BKE_INTERN_MULTIRES_RESHAPE_H__ -#define __BKE_INTERN_MULTIRES_RESHAPE_H__ +#pragma once #include "BLI_sys_types.h" @@ -331,4 +330,3 @@ void multires_reshape_apply_base_refine_from_base(MultiresReshapeContext *reshap * * NOTE: Will re-evaluate all leading modifiers, so it's not cheap. */ void multires_reshape_apply_base_refine_from_deform(MultiresReshapeContext *reshape_context); -#endif /* __BKE_INTERN_MULTIRES_RESHAPE_H__ */ diff --git a/source/blender/blenkernel/intern/multires_unsubdivide.h b/source/blender/blenkernel/intern/multires_unsubdivide.h index e00a1ae6d8b..39c6da0b6c8 100644 --- a/source/blender/blenkernel/intern/multires_unsubdivide.h +++ b/source/blender/blenkernel/intern/multires_unsubdivide.h @@ -21,8 +21,7 @@ * \ingroup bke */ -#ifndef __BKE_INTERN_MULTIRES_UNSUBDIVIDE_H__ -#define __BKE_INTERN_MULTIRES_UNSUBDIVIDE_H__ +#pragma once #include "BLI_sys_types.h" @@ -90,5 +89,3 @@ void multires_unsubdivide_context_free(MultiresUnsubdivideContext *context); /* Rebuilds all subdivision to the level 0 base mesh. */ bool multires_unsubdivide_to_basemesh(MultiresUnsubdivideContext *context); - -#endif /* __BKE_INTERN_MULTIRES_UNSUBDIVIDE_H__ */ diff --git a/source/blender/blenkernel/intern/ocean_intern.h b/source/blender/blenkernel/intern/ocean_intern.h index 7da88419219..39ce0db09d6 100644 --- a/source/blender/blenkernel/intern/ocean_intern.h +++ b/source/blender/blenkernel/intern/ocean_intern.h @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __BKE_OCEAN_INTERN_H__ -#define __BKE_OCEAN_INTERN_H__ +#pragma once /** \file * \ingroup bli @@ -133,5 +132,3 @@ typedef struct Ocean { #ifdef __cplusplus } #endif - -#endif diff --git a/source/blender/blenkernel/intern/pbvh_intern.h b/source/blender/blenkernel/intern/pbvh_intern.h index 6f8bae822ea..63bc8753fc7 100644 --- a/source/blender/blenkernel/intern/pbvh_intern.h +++ b/source/blender/blenkernel/intern/pbvh_intern.h @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __PBVH_INTERN_H__ -#define __PBVH_INTERN_H__ +#pragma once /** \file * \ingroup bli @@ -235,5 +234,3 @@ bool pbvh_bmesh_node_nearest_to_ray(PBVHNode *node, bool use_original); void pbvh_bmesh_normals_update(PBVHNode **nodes, int totnode); - -#endif diff --git a/source/blender/blenkernel/intern/subdiv_converter.h b/source/blender/blenkernel/intern/subdiv_converter.h index fb0e84ade13..ea0efe994b5 100644 --- a/source/blender/blenkernel/intern/subdiv_converter.h +++ b/source/blender/blenkernel/intern/subdiv_converter.h @@ -17,8 +17,7 @@ * All rights reserved. */ -#ifndef __SUBDIV_CONVERTER_H__ -#define __SUBDIV_CONVERTER_H__ +#pragma once /** \file * \ingroup bke @@ -51,5 +50,3 @@ int BKE_subdiv_converter_vtx_boundary_interpolation_from_settings(const SubdivSe /* TODO(sergey): Find a way to make it OpenSubdiv_FVarLinearInterpolation, * without breaking compilation without OpenSubdiv. */ int BKE_subdiv_converter_fvar_linear_from_settings(const SubdivSettings *settings); - -#endif /* __SUBDIV_CONVERTER_H__ */ diff --git a/source/blender/blenkernel/intern/subdiv_inline.h b/source/blender/blenkernel/intern/subdiv_inline.h index a51a33feb3d..ba45d0a4997 100644 --- a/source/blender/blenkernel/intern/subdiv_inline.h +++ b/source/blender/blenkernel/intern/subdiv_inline.h @@ -21,8 +21,7 @@ * \ingroup bke */ -#ifndef __SUBDIV_INLINE_H__ -#define __SUBDIV_INLINE_H__ +#pragma once #include "BLI_assert.h" #include "BLI_compiler_compat.h" @@ -114,5 +113,3 @@ BLI_INLINE float BKE_subdiv_edge_crease_to_sharpness_char(char edge_crease) const float edge_crease_f = edge_crease / 255.0f; return BKE_subdiv_edge_crease_to_sharpness_f(edge_crease_f); } - -#endif /* __SUBDIV_INLINE_H__ */ -- cgit v1.2.3