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/nodes/NOD_common.h | 5 +---- source/blender/nodes/NOD_composite.h | 5 +---- source/blender/nodes/NOD_derived_node_tree.hh | 5 +---- source/blender/nodes/NOD_function.h | 5 +---- source/blender/nodes/NOD_node_tree_multi_function.hh | 5 +---- source/blender/nodes/NOD_node_tree_ref.hh | 5 +---- source/blender/nodes/NOD_shader.h | 5 +---- source/blender/nodes/NOD_simulation.h | 5 +---- source/blender/nodes/NOD_socket.h | 5 +---- source/blender/nodes/NOD_texture.h | 5 +---- source/blender/nodes/composite/node_composite_util.h | 5 +---- source/blender/nodes/function/node_function_util.hh | 5 +---- source/blender/nodes/intern/node_common.h | 5 +---- source/blender/nodes/intern/node_exec.h | 5 +---- source/blender/nodes/intern/node_util.h | 5 +---- source/blender/nodes/shader/node_shader_util.h | 5 +---- source/blender/nodes/simulation/node_simulation_util.h | 5 +---- source/blender/nodes/texture/node_texture_util.h | 5 +---- 18 files changed, 18 insertions(+), 72 deletions(-) (limited to 'source/blender/nodes') diff --git a/source/blender/nodes/NOD_common.h b/source/blender/nodes/NOD_common.h index dcc4f4d0b76..50ed992dcb6 100644 --- a/source/blender/nodes/NOD_common.h +++ b/source/blender/nodes/NOD_common.h @@ -21,8 +21,7 @@ * \ingroup nodes */ -#ifndef __NOD_COMMON_H__ -#define __NOD_COMMON_H__ +#pragma once #include "BKE_node.h" @@ -49,5 +48,3 @@ void node_group_output_update(struct bNodeTree *ntree, struct bNode *node); #ifdef __cplusplus } #endif - -#endif /* __NOD_COMMON_H__ */ diff --git a/source/blender/nodes/NOD_composite.h b/source/blender/nodes/NOD_composite.h index 6b1dd239294..99bcb849ebd 100644 --- a/source/blender/nodes/NOD_composite.h +++ b/source/blender/nodes/NOD_composite.h @@ -21,8 +21,7 @@ * \ingroup nodes */ -#ifndef __NOD_COMPOSITE_H__ -#define __NOD_COMPOSITE_H__ +#pragma once #include "BKE_node.h" @@ -150,5 +149,3 @@ void register_node_type_cmp_custom_group(bNodeType *ntype); #ifdef __cplusplus } #endif - -#endif diff --git a/source/blender/nodes/NOD_derived_node_tree.hh b/source/blender/nodes/NOD_derived_node_tree.hh index d79bd9031b8..205ba68dd0a 100644 --- a/source/blender/nodes/NOD_derived_node_tree.hh +++ b/source/blender/nodes/NOD_derived_node_tree.hh @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __NOD_DERIVED_NODE_TREE_HH__ -#define __NOD_DERIVED_NODE_TREE_HH__ +#pragma once /** \file * \ingroup nodes @@ -513,5 +512,3 @@ inline Span DerivedNodeTree::group_inputs() const } } // namespace blender::nodes - -#endif /* __NOD_DERIVED_NODE_TREE_HH__ */ diff --git a/source/blender/nodes/NOD_function.h b/source/blender/nodes/NOD_function.h index 4c05da694f7..5391951debb 100644 --- a/source/blender/nodes/NOD_function.h +++ b/source/blender/nodes/NOD_function.h @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __NOD_FUNCTION_H__ -#define __NOD_FUNCTION_H__ +#pragma once #ifdef __cplusplus extern "C" { @@ -31,5 +30,3 @@ void register_node_type_fn_object_transforms(void); #ifdef __cplusplus } #endif - -#endif /* __NOD_FUNCTION_H__ */ diff --git a/source/blender/nodes/NOD_node_tree_multi_function.hh b/source/blender/nodes/NOD_node_tree_multi_function.hh index 81b467eca3a..f5cb827dc4f 100644 --- a/source/blender/nodes/NOD_node_tree_multi_function.hh +++ b/source/blender/nodes/NOD_node_tree_multi_function.hh @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __NOD_NODE_TREE_FUNCTION_HH__ -#define __NOD_NODE_TREE_FUNCTION_HH__ +#pragma once /** \file * \ingroup nodes @@ -389,5 +388,3 @@ MFNetworkTreeMap insert_node_tree_into_mf_network(fn::MFNetwork &network, ResourceCollector &resources); } // namespace blender::nodes - -#endif /* __NOD_NODE_TREE_FUNCTION_HH__ */ diff --git a/source/blender/nodes/NOD_node_tree_ref.hh b/source/blender/nodes/NOD_node_tree_ref.hh index ebf5709ef50..f18a20d6df9 100644 --- a/source/blender/nodes/NOD_node_tree_ref.hh +++ b/source/blender/nodes/NOD_node_tree_ref.hh @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __NOD_NODE_TREE_REF_HH__ -#define __NOD_NODE_TREE_REF_HH__ +#pragma once /** \file * \ingroup nodes @@ -441,5 +440,3 @@ inline bNodeTree *NodeTreeRef::btree() const } } // namespace blender::nodes - -#endif /* __NOD_NODE_TREE_REF_HH__ */ diff --git a/source/blender/nodes/NOD_shader.h b/source/blender/nodes/NOD_shader.h index bf548aea5f4..2911e0fbea6 100644 --- a/source/blender/nodes/NOD_shader.h +++ b/source/blender/nodes/NOD_shader.h @@ -21,8 +21,7 @@ * \ingroup nodes */ -#ifndef __NOD_SHADER_H__ -#define __NOD_SHADER_H__ +#pragma once #include "BKE_node.h" @@ -146,5 +145,3 @@ void register_node_type_sh_custom_group(bNodeType *ntype); #ifdef __cplusplus } #endif - -#endif diff --git a/source/blender/nodes/NOD_simulation.h b/source/blender/nodes/NOD_simulation.h index 2947d38fe83..d769bbce204 100644 --- a/source/blender/nodes/NOD_simulation.h +++ b/source/blender/nodes/NOD_simulation.h @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __NOD_SIMULATION_H__ -#define __NOD_SIMULATION_H__ +#pragma once #ifdef __cplusplus extern "C" { @@ -43,5 +42,3 @@ void register_node_type_sim_particle_attribute(void); #ifdef __cplusplus } #endif - -#endif /* __NOD_SIMULATION_H__ */ diff --git a/source/blender/nodes/NOD_socket.h b/source/blender/nodes/NOD_socket.h index 212a3d35a24..3344a25bdea 100644 --- a/source/blender/nodes/NOD_socket.h +++ b/source/blender/nodes/NOD_socket.h @@ -21,8 +21,7 @@ * \ingroup nodes */ -#ifndef __NOD_SOCKET_H__ -#define __NOD_SOCKET_H__ +#pragma once #include "DNA_listBase.h" @@ -58,5 +57,3 @@ void register_standard_node_socket_types(void); #ifdef __cplusplus } #endif - -#endif /* __NOD_SOCKET_H__ */ diff --git a/source/blender/nodes/NOD_texture.h b/source/blender/nodes/NOD_texture.h index 07a05f01bc5..af59fefd925 100644 --- a/source/blender/nodes/NOD_texture.h +++ b/source/blender/nodes/NOD_texture.h @@ -21,8 +21,7 @@ * \ingroup nodes */ -#ifndef __NOD_TEXTURE_H__ -#define __NOD_TEXTURE_H__ +#pragma once #include "BKE_node.h" @@ -78,5 +77,3 @@ void register_node_type_tex_proc_distnoise(void); #ifdef __cplusplus } #endif - -#endif diff --git a/source/blender/nodes/composite/node_composite_util.h b/source/blender/nodes/composite/node_composite_util.h index 0edc864e98f..8810b760e8c 100644 --- a/source/blender/nodes/composite/node_composite_util.h +++ b/source/blender/nodes/composite/node_composite_util.h @@ -21,8 +21,7 @@ * \ingroup nodes */ -#ifndef __NODE_COMPOSITE_UTIL_H__ -#define __NODE_COMPOSITE_UTIL_H__ +#pragma once #include "DNA_ID.h" #include "DNA_movieclip_types.h" @@ -63,5 +62,3 @@ void cmp_node_type_base( #ifdef __cplusplus } #endif - -#endif /* __NODE_COMPOSITE_UTIL_H__ */ diff --git a/source/blender/nodes/function/node_function_util.hh b/source/blender/nodes/function/node_function_util.hh index 8e09ab0f24f..d57d1383019 100644 --- a/source/blender/nodes/function/node_function_util.hh +++ b/source/blender/nodes/function/node_function_util.hh @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __NODE_FUNCTION_UTIL_H__ -#define __NODE_FUNCTION_UTIL_H__ +#pragma once #include @@ -40,5 +39,3 @@ void fn_node_type_base( struct bNodeType *ntype, int type, const char *name, short nclass, short flag); bool fn_node_poll_default(struct bNodeType *ntype, struct bNodeTree *ntree); - -#endif /* __NODE_FUNCTION_UTIL_H__ */ diff --git a/source/blender/nodes/intern/node_common.h b/source/blender/nodes/intern/node_common.h index 7810e9f1f14..7aad6782640 100644 --- a/source/blender/nodes/intern/node_common.h +++ b/source/blender/nodes/intern/node_common.h @@ -21,8 +21,7 @@ * \ingroup nodes */ -#ifndef __NODE_COMMON_H__ -#define __NODE_COMMON_H__ +#pragma once #include "DNA_listBase.h" @@ -40,5 +39,3 @@ void ntree_update_reroute_nodes(struct bNodeTree *ntree); #ifdef __cplusplus } #endif - -#endif diff --git a/source/blender/nodes/intern/node_exec.h b/source/blender/nodes/intern/node_exec.h index 87a61f0a490..806dd10d9bf 100644 --- a/source/blender/nodes/intern/node_exec.h +++ b/source/blender/nodes/intern/node_exec.h @@ -21,8 +21,7 @@ * \ingroup nodes */ -#ifndef __NODE_EXEC_H__ -#define __NODE_EXEC_H__ +#pragma once #include "DNA_listBase.h" @@ -105,5 +104,3 @@ void ntreeTexEndExecTree_internal(struct bNodeTreeExec *exec); #ifdef __cplusplus } #endif - -#endif diff --git a/source/blender/nodes/intern/node_util.h b/source/blender/nodes/intern/node_util.h index 61f8fe6809d..1b542a9420a 100644 --- a/source/blender/nodes/intern/node_util.h +++ b/source/blender/nodes/intern/node_util.h @@ -21,8 +21,7 @@ * \ingroup nodes */ -#ifndef __NODE_UTIL_H__ -#define __NODE_UTIL_H__ +#pragma once #include "DNA_listBase.h" @@ -110,5 +109,3 @@ void node_socket_set_vector(struct bNodeTree *ntree, #ifdef __cplusplus } #endif - -#endif diff --git a/source/blender/nodes/shader/node_shader_util.h b/source/blender/nodes/shader/node_shader_util.h index b0ba1ea194f..de192f51a5f 100644 --- a/source/blender/nodes/shader/node_shader_util.h +++ b/source/blender/nodes/shader/node_shader_util.h @@ -21,8 +21,7 @@ * \ingroup nodes */ -#ifndef __NODE_SHADER_UTIL_H__ -#define __NODE_SHADER_UTIL_H__ +#pragma once #include #include @@ -116,5 +115,3 @@ void ntreeExecGPUNodes(struct bNodeTreeExec *exec, #ifdef __cplusplus } #endif - -#endif diff --git a/source/blender/nodes/simulation/node_simulation_util.h b/source/blender/nodes/simulation/node_simulation_util.h index adbe2ad5e8f..76a10715cff 100644 --- a/source/blender/nodes/simulation/node_simulation_util.h +++ b/source/blender/nodes/simulation/node_simulation_util.h @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __NODE_SIM_UTIL_H__ -#define __NODE_SIM_UTIL_H__ +#pragma once #include @@ -36,5 +35,3 @@ void sim_node_type_base( struct bNodeType *ntype, int type, const char *name, short nclass, short flag); bool sim_node_poll_default(struct bNodeType *ntype, struct bNodeTree *ntree); - -#endif /* __NODE_SIM_UTIL_H__ */ diff --git a/source/blender/nodes/texture/node_texture_util.h b/source/blender/nodes/texture/node_texture_util.h index 7b8581c1f89..17a88ddaf5b 100644 --- a/source/blender/nodes/texture/node_texture_util.h +++ b/source/blender/nodes/texture/node_texture_util.h @@ -21,8 +21,7 @@ * \ingroup nodes */ -#ifndef __NODE_TEXTURE_UTIL_H__ -#define __NODE_TEXTURE_UTIL_H__ +#pragma once #include #include @@ -131,5 +130,3 @@ void params_from_cdata(TexParams *out, TexCallData *in); #ifdef __cplusplus } #endif - -#endif -- cgit v1.2.3