[Bf-blender-cvs] [56816311098] master: Cleanup: ensure header guards come first

Campbell Barton noreply at git.blender.org
Wed Jan 9 23:00:20 CET 2019


Commit: 5681631109852d1037cddafd60f39552f8ba3bbf
Author: Campbell Barton
Date:   Thu Jan 10 08:46:38 2019 +1100
Branches: master
https://developer.blender.org/rB5681631109852d1037cddafd60f39552f8ba3bbf

Cleanup: ensure header guards come first

Causes clang-format not to detect header guards,
indenting all preprocessor lines in the header.

===================================================================

M	intern/clog/CLG_log.h
M	intern/ghost/intern/GHOST_EventNDOF.h
M	intern/ghost/intern/GHOST_NDOFManager.h
M	source/blender/blenkernel/BKE_multires.h
M	source/blender/blenkernel/BKE_particle.h
M	source/blender/blenkernel/BKE_subdiv.h
M	source/blender/blenlib/BLI_endian_switch_inline.h
M	source/blender/editors/include/UI_resources.h
M	source/blender/makesrna/RNA_types.h

===================================================================

diff --git a/intern/clog/CLG_log.h b/intern/clog/CLG_log.h
index 61fc93be9e7..390122289b1 100644
--- a/intern/clog/CLG_log.h
+++ b/intern/clog/CLG_log.h
@@ -18,8 +18,8 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifndef __CLOG_H__
-#define __CLOG_H__
+#ifndef __CLG_LOG_H__
+#define __CLG_LOG_H__
 
 /** \file clog/CLG_log.h
  *  \ingroup clog
@@ -211,4 +211,4 @@ void CLG_logref_init(CLG_LogRef *clg_ref);
 }
 #endif
 
-#endif /* __CLOG_H__ */
+#endif /* __CLG_LOG_H__ */
diff --git a/intern/ghost/intern/GHOST_EventNDOF.h b/intern/ghost/intern/GHOST_EventNDOF.h
index b81f74becee..a7a7639c98e 100644
--- a/intern/ghost/intern/GHOST_EventNDOF.h
+++ b/intern/ghost/intern/GHOST_EventNDOF.h
@@ -24,16 +24,15 @@
  *  \ingroup GHOST
  */
 
+#ifndef __GHOST_EVENTNDOF_H__
+#define __GHOST_EVENTNDOF_H__
+
 #ifndef WITH_INPUT_NDOF
 #  error NDOF code included in non-NDOF-enabled build
 #endif
 
-#ifndef __GHOST_EVENTNDOF_H__
-#define __GHOST_EVENTNDOF_H__
-
 #include "GHOST_Event.h"
 
-
 class GHOST_EventNDOFMotion : public GHOST_Event
 {
 protected:
diff --git a/intern/ghost/intern/GHOST_NDOFManager.h b/intern/ghost/intern/GHOST_NDOFManager.h
index 78f24e07a6e..b23673940e6 100644
--- a/intern/ghost/intern/GHOST_NDOFManager.h
+++ b/intern/ghost/intern/GHOST_NDOFManager.h
@@ -21,16 +21,15 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#ifndef __GHOST_NDOFMANAGER_H__
+#define __GHOST_NDOFMANAGER_H__
+
 #ifndef WITH_INPUT_NDOF
 #  error NDOF code included in non-NDOF-enabled build
 #endif
 
-#ifndef __GHOST_NDOFMANAGER_H__
-#define __GHOST_NDOFMANAGER_H__
-
 #include "GHOST_System.h"
 
-
 // #define DEBUG_NDOF_MOTION
 // #define DEBUG_NDOF_BUTTONS
 
diff --git a/source/blender/blenkernel/BKE_multires.h b/source/blender/blenkernel/BKE_multires.h
index 190ee9e7270..bc01cc6b45c 100644
--- a/source/blender/blenkernel/BKE_multires.h
+++ b/source/blender/blenkernel/BKE_multires.h
@@ -163,6 +163,6 @@ BLI_INLINE void BKE_multires_construct_tangent_matrix(
         const float dPdv[3],
         const int corner);
 
-#endif  /* __BKE_MULTIRES_H__ */
-
 #include "intern/multires_inline.h"
+
+#endif  /* __BKE_MULTIRES_H__ */
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index 5a1241f1de2..ee8612c3d7b 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -483,11 +483,11 @@ void BKE_particle_settings_eval_reset(
 void BKE_particle_system_eval_init(struct Depsgraph *depsgraph,
                                    struct Object *object);
 
-#endif
-
 /* Draw Cache */
 enum {
 	BKE_PARTICLE_BATCH_DIRTY_ALL = 0,
 };
 void BKE_particle_batch_cache_dirty_tag(struct ParticleSystem *psys, int mode);
 void BKE_particle_batch_cache_free(struct ParticleSystem *psys);
+
+#endif  /* __BKE_PARTICLE_H__ */
diff --git a/source/blender/blenkernel/BKE_subdiv.h b/source/blender/blenkernel/BKE_subdiv.h
index 70572d30819..352581c99d6 100644
--- a/source/blender/blenkernel/BKE_subdiv.h
+++ b/source/blender/blenkernel/BKE_subdiv.h
@@ -232,6 +232,6 @@ BLI_INLINE int BKE_subdiv_rotate_quad_to_corner(
         const float u, const float v,
         float *r_u, float *r_v);
 
-#endif  /* __BKE_SUBDIV_H__ */
-
 #include "intern/subdiv_inline.h"
+
+#endif  /* __BKE_SUBDIV_H__ */
diff --git a/source/blender/blenlib/BLI_endian_switch_inline.h b/source/blender/blenlib/BLI_endian_switch_inline.h
index 280503e9b93..2be76e67b37 100644
--- a/source/blender/blenlib/BLI_endian_switch_inline.h
+++ b/source/blender/blenlib/BLI_endian_switch_inline.h
@@ -20,14 +20,14 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#ifndef __BLI_ENDIAN_SWITCH_INLINE_H__
+#define __BLI_ENDIAN_SWITCH_INLINE_H__
+
 /* only include from header */
 #ifndef __BLI_ENDIAN_SWITCH_H__
 #  error "this file isnt to be directly included"
 #endif
 
-#ifndef __BLI_ENDIAN_SWITCH_INLINE_H__
-#define __BLI_ENDIAN_SWITCH_INLINE_H__
-
 /** \file blender/blenlib/BLI_endian_switch_inline.h
  *  \ingroup bli
  */
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index 92871484e66..d686594f334 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -29,11 +29,11 @@
  *  \ingroup editorui
  */
 
-#include "BLI_sys_types.h"
-
 #ifndef __UI_RESOURCES_H__
 #define __UI_RESOURCES_H__
 
+#include "BLI_sys_types.h"
+
 /* Define icon enum. */
 #define DEF_ICON(name) ICON_##name,
 #define DEF_ICON_VECTOR(name) ICON_##name,
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 72e1c05de3c..2c1bd2069b0 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -24,12 +24,11 @@
  *  \ingroup RNA
  */
 
-
-#include "../blenlib/BLI_sys_types.h"
-
 #ifndef __RNA_TYPES_H__
 #define __RNA_TYPES_H__
 
+#include "../blenlib/BLI_sys_types.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif



More information about the Bf-blender-cvs mailing list