[Bf-blender-cvs] [e4cd4c3] master: Cleanup: style

Campbell Barton noreply at git.blender.org
Tue May 12 22:11:31 CEST 2015


Commit: e4cd4c383f13eb9705d9f5d3536c0b2b72e727bd
Author: Campbell Barton
Date:   Wed May 13 06:10:49 2015 +1000
Branches: master
https://developer.blender.org/rBe4cd4c383f13eb9705d9f5d3536c0b2b72e727bd

Cleanup: style

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

M	source/blender/blenkernel/BKE_armature.h
M	source/blender/blenkernel/intern/armature.c
M	source/blender/blenkernel/intern/armature_update.c
M	source/blender/blenkernel/intern/curve.c
M	source/blender/blenkernel/intern/depsgraph.c
M	source/blender/blenkernel/intern/object_update.c
M	source/blender/compositor/operations/COM_DisplaceOperation.cpp
M	source/blender/depsgraph/intern/depsgraph.h
M	source/blender/depsgraph/intern/depsgraph_build.cc
M	source/blender/depsgraph/intern/depsgraph_build_nodes.cc
M	source/blender/depsgraph/intern/depsgraph_build_relations.cc
M	source/blender/depsgraph/intern/depsgraph_debug.cc
M	source/blender/depsgraph/intern/depsgraph_tag.cc
M	source/blender/depsgraph/intern/depsgraph_types.h
M	source/blender/depsgraph/intern/depsnode.h
M	source/blender/depsgraph/util/depsgraph_util_function.h
M	source/blender/depsgraph/util/depsgraph_util_pchanmap.h
M	source/blender/editors/interface/interface.c

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

diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index 5bdf360..a834a83 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -148,10 +148,12 @@ struct bPose;
 struct bSplineIKConstraint;
 struct EvaluationContext;
 
-struct bPoseChannel *BKE_armature_ik_solver_find_root(struct bPoseChannel *pchan,
-                                                      struct bKinematicConstraint *data);
-struct bPoseChannel* BKE_armature_splineik_solver_find_root(struct bPoseChannel *pchan,
-                                                            struct bSplineIKConstraint *data);
+struct bPoseChannel *BKE_armature_ik_solver_find_root(
+        struct bPoseChannel *pchan,
+        struct bKinematicConstraint *data);
+struct bPoseChannel *BKE_armature_splineik_solver_find_root(
+        struct bPoseChannel *pchan,
+        struct bSplineIKConstraint *data);
 
 void BKE_pose_splineik_init_tree(struct Scene *scene, struct Object *ob, float ctime);
 void BKE_splineik_execute_tree(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan_root, float ctime);
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 498609e..27d3d1c 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -2221,8 +2221,9 @@ BoundBox *BKE_armature_boundbox_get(Object *ob)
 
 /************** Graph evaluation ********************/
 
-bPoseChannel *BKE_armature_ik_solver_find_root(bPoseChannel *pchan,
-                                               bKinematicConstraint *data)
+bPoseChannel *BKE_armature_ik_solver_find_root(
+        bPoseChannel *pchan,
+        bKinematicConstraint *data)
 {
 	bPoseChannel *rootchan = pchan;
 	if (!(data->flag & CONSTRAINT_IK_TIP)) {
@@ -2243,8 +2244,9 @@ bPoseChannel *BKE_armature_ik_solver_find_root(bPoseChannel *pchan,
 	return rootchan;
 }
 
-bPoseChannel* BKE_armature_splineik_solver_find_root(bPoseChannel *pchan,
-                                                     bSplineIKConstraint *data)
+bPoseChannel *BKE_armature_splineik_solver_find_root(
+        bPoseChannel *pchan,
+        bSplineIKConstraint *data)
 {
 	bPoseChannel *rootchan = pchan;
 	int segcount = 0;
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c
index aa36036..ceda9f0 100644
--- a/source/blender/blenkernel/intern/armature_update.c
+++ b/source/blender/blenkernel/intern/armature_update.c
@@ -629,7 +629,7 @@ void BKE_pose_constraints_evaluate(EvaluationContext *UNUSED(eval_ctx),
                                    Object *ob,
                                    bPoseChannel *pchan)
 {
-	Scene *scene = (Scene*)G.main->scene.first;
+	Scene *scene = G.main->scene.first;
 	DEBUG_PRINT("%s on %s pchan %s\n", __func__, ob->id.name, pchan->name);
 	if (pchan->flag & POSE_IKTREE || pchan->flag & POSE_IKSPLINE) {
 		/* IK are being solved separately/ */
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index c95b005..c01b343 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -1394,7 +1394,7 @@ void BKE_curve_forward_diff_tangent_bezier(float q0, float q1, float q2, float q
 
 	rt0 = 3.0f * (q1 - q0);
 	rt1 = f * (3.0f * (q3 - q0) + 9.0f * (q1 - q2));
-	rt2 = 6.0f * (q0 + q2)- 12.0f * q1;
+	rt2 = 6.0f * (q0 + q2) - 12.0f * q1;
 
 	q0 = rt0;
 	q1 = f * (rt1 + rt2);
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 9ee9f3d..2fd5304 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -3235,7 +3235,7 @@ short DAG_get_eval_flags_for_object(Scene *scene, void *object)
 	DagNode *node;
 
 	if (!DEG_depsgraph_use_legacy()) {
-		return DEG_get_eval_flags_for_id(scene->depsgraph, (ID*)object);
+		return DEG_get_eval_flags_for_id(scene->depsgraph, (ID *)object);
 	}
 
 	if (scene->theDag == NULL) {
@@ -3541,7 +3541,7 @@ void DAG_ids_clear_recalc(Main *bmain)
 
 short DAG_get_eval_flags_for_object(Scene *scene, void *object)
 {
-	return DEG_get_eval_flags_for_id(scene->depsgraph, (ID*)object);
+	return DEG_get_eval_flags_for_id(scene->depsgraph, (ID *)object);
 }
 
 void DAG_ids_flush_tagged(Main *bmain)
diff --git a/source/blender/blenkernel/intern/object_update.c b/source/blender/blenkernel/intern/object_update.c
index 972a93b..46d68e7 100644
--- a/source/blender/blenkernel/intern/object_update.c
+++ b/source/blender/blenkernel/intern/object_update.c
@@ -322,7 +322,7 @@ void BKE_object_eval_uber_transform(EvaluationContext *UNUSED(eval_ctx),
 			copy_m4_m4(ob->obmat, ob->proxy_from->obmat);
 	}
 
-	ob->recalc &= ~(OB_RECALC_OB|OB_RECALC_TIME);
+	ob->recalc &= ~(OB_RECALC_OB | OB_RECALC_TIME);
 	if (ob->data == NULL) {
 		ob->recalc &= ~OB_RECALC_DATA;
 	}
@@ -336,5 +336,5 @@ void BKE_object_eval_uber_data(EvaluationContext *eval_ctx,
 	BLI_assert(ob->type != OB_ARMATURE);
 	BKE_object_handle_data_update(eval_ctx, scene, ob);
 
-	ob->recalc &= ~(OB_RECALC_DATA|OB_RECALC_TIME);
+	ob->recalc &= ~(OB_RECALC_DATA | OB_RECALC_TIME);
 }
diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.cpp b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
index e749157..6dfef8a 100644
--- a/source/blender/compositor/operations/COM_DisplaceOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
@@ -55,7 +55,7 @@ void DisplaceOperation::executePixelSampled(float output[4], float x, float y, P
 	float uv[2], deriv[2][2];
 
 	pixelTransform(xy, uv, deriv);
-	if(is_zero_v2(deriv[0]) && is_zero_v2(deriv[1])) {
+	if (is_zero_v2(deriv[0]) && is_zero_v2(deriv[1])) {
 		this->m_inputColorProgram->readSampled(output, uv[0], uv[1], COM_PS_BILINEAR);
 	}
 	else {
diff --git a/source/blender/depsgraph/intern/depsgraph.h b/source/blender/depsgraph/intern/depsgraph.h
index 8ce7362..0232410 100644
--- a/source/blender/depsgraph/intern/depsgraph.h
+++ b/source/blender/depsgraph/intern/depsgraph.h
@@ -72,7 +72,7 @@ struct DepsRelation {
 	DepsNode *to;                 /* B */
 
 	/* relationship attributes */
-	const char* name;             /* label for debugging */
+	const char *name;             /* label for debugging */
 
 	eDepsRelation_Type type;      /* type */
 	int flag;                     /* (eDepsRelation_Flag) */
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc
index b5e09db..15b8cc0 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -178,7 +178,7 @@ string deg_fcurve_id_name(const FCurve *fcu)
 
 static void deg_graph_build_finalize(Depsgraph *graph)
 {
-	std::stack<OperationDepsNode*> stack;
+	std::stack<OperationDepsNode *> stack;
 
 	for (Depsgraph::OperationNodes::const_iterator it_op = graph->operations.begin();
 	     it_op != graph->operations.end();
@@ -192,8 +192,9 @@ static void deg_graph_build_finalize(Depsgraph *graph)
 		     ++it_rel)
 		{
 			DepsRelation *rel = *it_rel;
-			if (rel->from->type == DEPSNODE_TYPE_OPERATION &&
-			    (rel->flag & DEPSREL_FLAG_CYCLIC) == 0) {
+			if ((rel->from->type == DEPSNODE_TYPE_OPERATION) &&
+			    (rel->flag & DEPSREL_FLAG_CYCLIC) == 0)
+			{
 				++node->num_links_pending;
 			}
 		}
diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
index a55fb90..02538d9 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
@@ -124,7 +124,7 @@ RootDepsNode *DepsgraphNodeBuilder::add_root_node()
 IDDepsNode *DepsgraphNodeBuilder::add_id_node(ID *id)
 {
 	const char *idtype_name = BKE_idcode_to_name(GS(id->name));
-	return m_graph->add_id_node(id, string(id->name+2) + "[" + idtype_name + "]");
+	return m_graph->add_id_node(id, string(id->name + 2) + "[" + idtype_name + "]");
 }
 
 TimeSourceDepsNode *DepsgraphNodeBuilder::add_time_source(ID *id)
@@ -404,8 +404,8 @@ void DepsgraphNodeBuilder::build_object(Scene *scene, Base *base, Object *ob)
 						id_node->eval_flags |= DAG_EVAL_NEED_CURVE_PATH;
 					}
 				}
+				break;
 			}
-			break;
 
 			case OB_ARMATURE: /* Pose */
 				if (ob->id.lib != NULL && ob->proxy_from != NULL) {
@@ -972,8 +972,8 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
 			add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
 			                   DEPSOP_TYPE_INIT, function_bind(BKE_mesh_eval_geometry, _1, (Mesh *)obdata),
 			                   DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
+			break;
 		}
-		break;
 
 		case OB_MBALL:
 		{
@@ -987,8 +987,8 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
 				                   DEPSOP_TYPE_INIT, function_bind(BKE_mball_eval_geometry, _1, (MetaBall *)obdata),
 				                   DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
 			}
+			break;
 		}
-		break;
 
 		case OB_CURVE:
 		case OB_FONT:
@@ -1003,8 +1003,8 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
 			add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
 			                   DEPSOP_TYPE_EXEC, function_bind(BKE_curve_eval_path, _1, (Curve *)obdata),
 			                   DEG_OPCODE_GEOMETRY_PATH, "Path");
+			break;
 		}
-		break;
 
 		case OB_SURF: /* Nurbs Surface */
 		{
@@ -1012,8 +1012,8 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
 			add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
 			                   DEPSOP_TYPE_INIT, function_bind(BKE_curve_eval_geometry, _1, (Curve *)obdata),
 			                   DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
+			break;
 		}
-		break;
 
 		case OB_LATTICE: /* Lattice */
 		{
@@ -1021,8 +1021,8 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
 			add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
 			                   DEPSOP_TYPE_INIT, function_bind(BKE_lattice_eval_geometry, _1, (Lattice *)obdata),
 			                   DEG_OPCODE_PLACEHOL

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list