[Bf-blender-cvs] [d94e7936ee3] blender2.8: Cleanup: style & header guards

Campbell Barton noreply at git.blender.org
Mon May 8 05:00:52 CEST 2017


Commit: d94e7936ee3221a3760882d3054f5ae3b69f9459
Author: Campbell Barton
Date:   Mon May 8 11:44:58 2017 +1000
Branches: blender2.8
https://developer.blender.org/rBd94e7936ee3221a3760882d3054f5ae3b69f9459

Cleanup: style & header guards

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

M	source/blender/draw/engines/eevee/eevee_private.h
M	source/blender/draw/intern/draw_common.h
M	source/blender/draw/modes/draw_mode_engines.h
M	source/blender/nodes/composite/nodes/node_composite_image.c
M	source/blender/windowmanager/intern/wm_draw.c
M	source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c

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

diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h
index 517926554f9..0c47af0f889 100644
--- a/source/blender/draw/engines/eevee/eevee_private.h
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@ -23,6 +23,9 @@
  *  \ingroup DNA
  */
 
+#ifndef __EEVEE_PRIVATE_H__
+#define __EEVEE_PRIVATE_H__
+
 struct Object;
 
 /* Minimum UBO is 16384 bytes */
@@ -300,3 +303,5 @@ static const float cubefacemat[6][4][4] = {
 	 {0.0, 0.0, 1.0, 0.0},
 	 {0.0, 0.0, 0.0, 1.0}},
 };
+
+#endif /* __EEVEE_PRIVATE_H__ */
diff --git a/source/blender/draw/intern/draw_common.h b/source/blender/draw/intern/draw_common.h
index d1af67fcdfd..d7ec08b2394 100644
--- a/source/blender/draw/intern/draw_common.h
+++ b/source/blender/draw/intern/draw_common.h
@@ -23,8 +23,8 @@
  *  \ingroup draw
  */
 
-#ifndef __DRAW_COMMON__
-#define __DRAW_COMMON__
+#ifndef __DRAW_COMMON_H__
+#define __DRAW_COMMON_H__
 
 struct DRWPass;
 struct DRWShadingGroup;
@@ -122,4 +122,4 @@ void DRW_shgroup_armature_edit(
 bool DRW_pose_mode_armature(
     struct Object *ob, struct Object *active_ob);
 
-#endif /* __DRAW_COMMON__ */
+#endif /* __DRAW_COMMON_H__ */
diff --git a/source/blender/draw/modes/draw_mode_engines.h b/source/blender/draw/modes/draw_mode_engines.h
index c3b4d5ee61a..23fedbba5a5 100644
--- a/source/blender/draw/modes/draw_mode_engines.h
+++ b/source/blender/draw/modes/draw_mode_engines.h
@@ -23,8 +23,8 @@
  *  \ingroup draw
  */
 
-#ifndef __DRAW_MODES_ENGINES_H__
-#define __DRAW_MODES_ENGINES_H__
+#ifndef __DRAW_MODE_ENGINES_H__
+#define __DRAW_MODE_ENGINES_H__
 
 extern DrawEngineType draw_engine_object_type;
 extern DrawEngineType draw_engine_edit_armature_type;
@@ -41,4 +41,4 @@ extern DrawEngineType draw_engine_particle_type;
 extern DrawEngineType draw_engine_pose_type;
 extern DrawEngineType draw_engine_sculpt_type;
 
-#endif /* __DRAW_MODES_ENGINES_H__ */
\ No newline at end of file
+#endif /* __DRAW_MODE_ENGINES_H__ */
\ No newline at end of file
diff --git a/source/blender/nodes/composite/nodes/node_composite_image.c b/source/blender/nodes/composite/nodes/node_composite_image.c
index f1fdaa32ce4..30f877891b6 100644
--- a/source/blender/nodes/composite/nodes/node_composite_image.c
+++ b/source/blender/nodes/composite/nodes/node_composite_image.c
@@ -107,8 +107,8 @@ static void cmp_node_image_add_pass_output(bNodeTree *ntree, bNode *node,
 
 		BLI_strncpy(sockdata->pass_name, passname, sizeof(sockdata->pass_name));
 
-		sock_index = BLI_listbase_count(&node->outputs)-1;
-		if (sock_index != after_index+1) {
+		sock_index = BLI_listbase_count(&node->outputs) - 1;
+		if (sock_index != after_index + 1) {
 			bNodeSocket *after_sock = BLI_findlink(&node->outputs, after_index);
 			BLI_remlink(&node->outputs, sock);
 			BLI_insertlinkafter(&node->outputs, after_sock, sock);
@@ -218,9 +218,9 @@ static void cmp_node_rlayer_create_outputs(bNodeTree *ntree, bNode *node, LinkNo
 
 	if (scene) {
 		RenderEngineType *engine_type = RE_engines_find(scene->r.engine);
-		if(engine_type && engine_type->update_render_passes) {
+		if (engine_type && engine_type->update_render_passes) {
 			SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, node->custom1);
-			if(srl) {
+			if (srl) {
 				RLayerUpdateData *data = MEM_mallocN(sizeof(RLayerUpdateData), "render layer update data");
 				data->available_sockets = available_sockets;
 				data->prev_index = -1;
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index 22af98e26c6..3c176912409 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -518,10 +518,10 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win)
 	bool copytex = false;
 
 	if (drawdata && drawdata->triple) {
-		#if 0 /* why do we need to clear before overwriting? */
+#if 0 /* why do we need to clear before overwriting? */
 		glClearColor(1, 1, 0, 0);
 		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-		#endif
+#endif
 
 		wmSubWindowSet(win, screen->mainwin);
 
@@ -659,10 +659,10 @@ static void wm_method_draw_triple_multiview(bContext *C, wmWindow *win, StereoVi
 
 		if (drawdata && drawdata->triple) {
 			if (id == 0) {
-				#if 0 /* why do we need to clear before overwriting? */
+#if 0 /* why do we need to clear before overwriting? */
 				glClearColor(0, 0, 0, 0);
 				glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-				#endif
+#endif
 
 				wmSubWindowSet(win, screen->mainwin);
 
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c b/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c
index ec6e6c3cb2f..7a1200fedc1 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c
@@ -429,7 +429,7 @@ void wm_manipulatormaps_handled_modal_update(
 	/* regular update for running operator */
 	if (modal_running) {
 		if (manipulator && manipulator->handler && manipulator->opname &&
-			STREQ(manipulator->opname, handler->op->idname))
+		    STREQ(manipulator->opname, handler->op->idname))
 		{
 			manipulator->handler(C, event, manipulator, 0);
 		}




More information about the Bf-blender-cvs mailing list