[Bf-blender-cvs] [3ee0ce27fae] master: Cleanup: style

Campbell Barton noreply at git.blender.org
Sun Aug 26 12:29:55 CEST 2018


Commit: 3ee0ce27faea8da816b07d7ef9ce31f97d517ca3
Author: Campbell Barton
Date:   Sun Aug 26 20:34:33 2018 +1000
Branches: master
https://developer.blender.org/rB3ee0ce27faea8da816b07d7ef9ce31f97d517ca3

Cleanup: style

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

M	source/blender/blenkernel/intern/rigidbody.c
M	source/blender/blenkernel/intern/seqeffects.c
M	source/blender/compositor/operations/COM_CryptomatteOperation.cpp
M	source/blender/depsgraph/intern/builder/deg_builder_cycle.cc
M	source/blender/depsgraph/intern/builder/deg_builder_map.cc
M	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
M	source/blender/depsgraph/intern/builder/deg_builder_nodes.h
M	source/blender/depsgraph/intern/depsgraph_build.cc
M	source/blender/imbuf/intern/jp2.c
M	source/blender/makesrna/intern/rna_nodetree.c
M	source/blender/modifiers/intern/MOD_cloth.c
M	source/blender/modifiers/intern/MOD_particleinstance.c
M	source/blender/modifiers/intern/MOD_smoke.c

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

diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 5d6695e6598..bfc61794935 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -701,9 +701,9 @@ static void rigidbody_validate_sim_object(RigidBodyWorld *rbw, Object *ob, bool
 /* --------------------- */
 
 static void rigidbody_constraint_init_spring(
-	RigidBodyCon *rbc, void (*set_spring)(rbConstraint*,int,int),
-	void (*set_stiffness)(rbConstraint*,int,float), void (*set_damping)(rbConstraint*,int,float)
-) {
+        RigidBodyCon *rbc, void (*set_spring)(rbConstraint *, int, int),
+        void (*set_stiffness)(rbConstraint *, int, float), void (*set_damping)(rbConstraint *, int, float))
+{
 	set_spring(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->flag & RBC_FLAG_USE_SPRING_X);
 	set_stiffness(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->spring_stiffness_x);
 	set_damping(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->spring_damping_x);
@@ -729,7 +729,7 @@ static void rigidbody_constraint_init_spring(
 	set_damping(rbc->physics_constraint, RB_LIMIT_ANG_Z, rbc->spring_damping_ang_z);
 }
 
-static void rigidbody_constraint_set_limits(RigidBodyCon *rbc, void (*set_limits)(rbConstraint*,int,float,float))
+static void rigidbody_constraint_set_limits(RigidBodyCon *rbc, void (*set_limits)(rbConstraint *, int, float, float))
 {
 	if (rbc->flag & RBC_FLAG_USE_LIMIT_LIN_X)
 		set_limits(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->limit_lin_x_lower, rbc->limit_lin_x_upper);
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 64c59bd7f2b..e3fc494584c 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -1772,8 +1772,9 @@ static float check_zone(WipeZone *wipezone, int x, int y, Sequence *seq, float f
 			/* BOX WIPE IS NOT WORKING YET */
 #if 0
 		case DO_BOX_WIPE:
-      if (!wipe->forward)
-        facf0 = 1.0f - facf0;  /* Go the other direction */
+			if (!wipe->forward) {
+				facf0 = 1.0f - facf0;  /* Go the other direction */
+			}
 
 			width = (int)(wipe->edgeWidth * ((xo + yo) / 2.0));
 			hwidth = (float)width / 2.0;
@@ -1806,8 +1807,9 @@ static float check_zone(WipeZone *wipezone, int x, int y, Sequence *seq, float f
 					output = in_band(hwidth, hyp2, 1, 1) * in_band(hwidth, hyp, 1, 1);
 			}
 
-      if (!wipe->forward)
-        facf0 = 1.0f - facf0;  /* Go the other direction */
+			if (!wipe->forward) {
+				facf0 = 1.0f - facf0;  /* Go the other direction */
+			}
 			angle = -1 / angle;
 			b1 = posy / 2 - (-angle) * posx / 2;
 			b3 = (yo - posy / 2) - (-angle) * (xo - posx / 2);
diff --git a/source/blender/compositor/operations/COM_CryptomatteOperation.cpp b/source/blender/compositor/operations/COM_CryptomatteOperation.cpp
index f3fa81075c6..9a1cbdd7a00 100644
--- a/source/blender/compositor/operations/COM_CryptomatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_CryptomatteOperation.cpp
@@ -22,7 +22,7 @@
 
 CryptomatteOperation::CryptomatteOperation(size_t num_inputs) : NodeOperation()
 {
-	for(size_t i = 0; i < num_inputs; i++) {
+	for (size_t i = 0; i < num_inputs; i++) {
 		this->addInputSocket(COM_DT_COLOR);
 	}
 	inputs.resize(num_inputs);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc b/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc
index 026aa309b02..feaba1a4aa8 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc
@@ -68,7 +68,9 @@ struct CyclesSolverState {
 		: graph(graph),
 		  traversal_stack(BLI_stack_new(sizeof(StackEntry),
 		                                "DEG detect cycles stack")),
-		  num_cycles(0) {
+		  num_cycles(0)
+	{
+		/* pass */
 	}
 	~CyclesSolverState() {
 		BLI_stack_free(traversal_stack);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_map.cc b/source/blender/depsgraph/intern/builder/deg_builder_map.cc
index 218483d1dc5..bf29156c3fe 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_map.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_map.cc
@@ -54,7 +54,8 @@ void BuilderMap::tagBuild(ID *id) {
 	BLI_gset_insert(set, id);
 }
 
-bool BuilderMap::checkIsBuiltAndTag(ID *id) {
+bool BuilderMap::checkIsBuiltAndTag(ID *id)
+{
 	void **key_p;
 	if (!BLI_gset_ensure_p_ex(set, id, &key_p)) {
 		*key_p = id;
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index b0894101414..953c8db0b3b 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -264,7 +264,8 @@ OperationDepsNode *DepsgraphNodeBuilder::find_operation_node(
 void DepsgraphNodeBuilder::begin_build() {
 }
 
-void DepsgraphNodeBuilder::build_id(ID* id) {
+void DepsgraphNodeBuilder::build_id(ID *id)
+{
 	if (id == NULL) {
 		return;
 	}
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
index f2154e58703..5ecfbf2f692 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
@@ -126,7 +126,7 @@ struct DepsgraphNodeBuilder {
 	                                       const char *name = "",
 	                                       int name_tag = -1);
 
-	void build_id(ID* id);
+	void build_id(ID *id);
 	void build_scene(Scene *scene);
 	void build_group(Base *base, Group *group);
 	void build_object(Base *base, Object *object);
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc
index 1b270e71d64..d3c34cc63a9 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -287,7 +287,7 @@ void DEG_scene_relations_update(Main *bmain, Scene *scene)
 	BLI_gset_clear(graph->entry_tags, NULL);
 
 	/* Build new nodes and relations. */
-	DEG_graph_build_from_scene(reinterpret_cast< ::Depsgraph * >(graph),
+	DEG_graph_build_from_scene(reinterpret_cast< ::Depsgraph *>(graph),
 	                           bmain,
 	                           scene);
 
@@ -349,7 +349,7 @@ void DEG_add_forcefield_relations(DepsNodeHandle *handle,
 	if (effectors == NULL) {
 		return;
 	}
-	for (EffectorCache *eff = (EffectorCache*)effectors->first; eff; eff = eff->next) {
+	for (EffectorCache *eff = (EffectorCache *)effectors->first; eff; eff = eff->next) {
 		if (eff->ob != object && eff->pd->forcefield != skip_forcefield) {
 			DEG_add_object_relation(handle, eff->ob, DEG_OB_COMP_TRANSFORM, name);
 			if (eff->psys) {
diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c
index e4923e94635..cd6bdd643d5 100644
--- a/source/blender/imbuf/intern/jp2.c
+++ b/source/blender/imbuf/intern/jp2.c
@@ -221,7 +221,7 @@ static opj_stream_t *opj_stream_create_from_buffer(
 	if (l_stream == NULL) {
 		return NULL;
 	}
-	opj_stream_set_user_data(l_stream, p_file , opj_read_from_buffer_free);
+	opj_stream_set_user_data(l_stream, p_file, opj_read_from_buffer_free);
 	opj_stream_set_user_data_length(l_stream, p_file->len);
 	opj_stream_set_read_function(l_stream,  opj_read_from_buffer);
 #if 0  /* UNUSED */
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index b41e9b1c4e5..847de75c604 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -7049,7 +7049,7 @@ static void def_cmp_cryptomatte(StructRNA *srna)
 	RNA_def_struct_sdna_from(srna, "NodeCryptomatte", "storage");
 	prop = RNA_def_property(srna, "matte_id", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_funcs(prop, "rna_NodeCryptomatte_matte_get", "rna_NodeCryptomatte_matte_length",
-								  "rna_NodeCryptomatte_matte_set");
+	                              "rna_NodeCryptomatte_matte_set");
 	RNA_def_property_ui_text(prop, "Matte Objects", "List of object and material crypto IDs to include in matte");
 	RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
 
diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c
index 0317e0a92e4..ef41c5a270c 100644
--- a/source/blender/modifiers/intern/MOD_cloth.c
+++ b/source/blender/modifiers/intern/MOD_cloth.c
@@ -125,7 +125,7 @@ static void updateDepgraph(ModifierData *md, const ModifierUpdateDepsgraphContex
 	if (clmd) {
 		/* Actual code uses get_collisionobjects */
 #ifdef WITH_LEGACY_DEPSGRAPH
-		dag_add_collision_relations(ctx->forest, ctx->scene, ctx->object, ctx->obNode, clmd->coll_parms->group, ctx->object->lay|ctx->scene->lay, eModifierType_Collision, NULL, true, "Cloth Collision");
+		dag_add_collision_relations(ctx->forest, ctx->scene, ctx->object, ctx->obNode, clmd->coll_parms->group, ctx->object->lay | ctx->scene->lay, eModifierType_Collision, NULL, true, "Cloth Collision");
 		dag_add_forcefield_relations(ctx->forest, ctx->scene, ctx->object, ctx->obNode, clmd->sim_parms->effector_weights, true, 0, "Cloth Field");
 #else
 	(void)ctx;
@@ -138,7 +138,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
 	ClothModifierData *clmd = (ClothModifierData *)md;
 	if (clmd != NULL) {
 		/* Actual code uses get_collisionobjects */
-		DEG_add_collision_relations(ctx->node, ctx->scene, ctx->object, clmd->coll_parms->group, ctx->object->lay|ctx->scene->lay, eModifierType_Collision, NULL, true, "Cloth Collision");
+		DEG_add_collision_relations(ctx->node, ctx->scene, ctx->object, clmd->coll_parms->group, ctx->object->lay | ctx->scene->lay, eModifierType_Collision, NULL, true, "Cloth Collision");
 
 		DEG_add_forcefield_relations(ctx->node, ctx->scene, ctx->object, clmd->sim_parms->effector_weights, true, 0, "Cloth Field");
 	}
diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c
index 267ef362d03..d88526e2845 100644
--- a/source/blender/modifiers/intern/MOD_particle

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list