[Bf-blender-cvs] [93cd8e2494a] blender2.8: Cleanup: style

Campbell Barton noreply at git.blender.org
Sat Nov 17 12:26:21 CET 2018


Commit: 93cd8e2494a03ca592337ddfeef3c61c2991ddf9
Author: Campbell Barton
Date:   Sat Nov 17 22:20:04 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB93cd8e2494a03ca592337ddfeef3c61c2991ddf9

Cleanup: style

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

M	source/blender/blenkernel/intern/constraint.c
M	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
M	source/blender/draw/engines/eevee/eevee_lightcache.c
M	source/blender/draw/engines/eevee/eevee_shaders.c

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

diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 96480862b93..96df4f402c5 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -5107,7 +5107,7 @@ bConstraint *BKE_constraint_find_from_target(Object *ob, bConstraintTarget *tgt,
 /* Finds the original copy of the constraint based on a COW copy. */
 static bConstraint *constraint_find_original(Object *ob, bPoseChannel *pchan, bConstraint *con, Object **r_orig_ob)
 {
-	Object *orig_ob = (Object*)DEG_get_original_id((ID*)ob);
+	Object *orig_ob = (Object *)DEG_get_original_id(&ob->id);
 
 	if (ELEM(orig_ob, NULL, ob)) {
 		return NULL;
@@ -5139,7 +5139,7 @@ static bConstraint *constraint_find_original(Object *ob, bPoseChannel *pchan, bC
 	int index = BLI_findindex(constraints, con);
 
 	if (index >= 0) {
-		bConstraint *orig_con = (bConstraint*)BLI_findlink(orig_constraints, index);
+		bConstraint *orig_con = BLI_findlink(orig_constraints, index);
 
 		/* Verify it has correct type and name. */
 		if (orig_con && orig_con->type == con->type && STREQ(orig_con->name, con->name)) {
@@ -5251,7 +5251,7 @@ void BKE_constraint_target_matrix_get(struct Depsgraph *depsgraph, Scene *scene,
 		cti->get_constraint_targets(con, &targets);
 
 		/* only calculate the target matrix on the first target */
-		ct = (bConstraintTarget *)BLI_findlink(&targets, index);
+		ct = BLI_findlink(&targets, index);
 
 		if (ct) {
 			if (cti->get_target_matrix)
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index adf67c5a8b1..c2cb09ce980 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -507,7 +507,7 @@ void DepsgraphNodeBuilder::build_collection(
 		id_node = find_id_node(&collection->id);
 		if (is_collection_visible &&
 		    id_node->is_directly_visible == false &&
-			id_node->is_collection_fully_expanded == true)
+		    id_node->is_collection_fully_expanded == true)
 		{
 			/* Collection became visible, make sure nested collections and
 			 * objects are poked with the new visibility flag, since they
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c
index 207179edd49..451e7174a94 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.c
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.c
@@ -940,8 +940,9 @@ static void eevee_lightbake_render_probe_sample(void *ved, void *user_data)
 	DRW_uniformbuffer_update(sldata->common_ubo, &sldata->common_data);
 
 	EEVEE_lightbake_render_scene(sldata, vedata, lbake->rt_fb, eprobe->position, prb->clipsta, prb->clipend);
-	EEVEE_lightbake_filter_glossy(sldata, vedata, lbake->rt_color, lbake->store_fb, lbake->cube_offset,prb->intensity,
-	                              lcache->mips_len, filter_quality, clamp);
+	EEVEE_lightbake_filter_glossy(
+	        sldata, vedata, lbake->rt_color, lbake->store_fb, lbake->cube_offset, prb->intensity,
+	        lcache->mips_len, filter_quality, clamp);
 
 	lcache->cube_len += 1;
 
diff --git a/source/blender/draw/engines/eevee/eevee_shaders.c b/source/blender/draw/engines/eevee/eevee_shaders.c
index 15a4a8fb304..6fbd0ae5173 100644
--- a/source/blender/draw/engines/eevee/eevee_shaders.c
+++ b/source/blender/draw/engines/eevee/eevee_shaders.c
@@ -153,27 +153,33 @@ void EEVEE_shaders_lightprobe_shaders_init(void)
 	        NULL);
 }
 
-GPUShader *EEVEE_shaders_probe_filter_glossy_sh_get(void) {
+GPUShader *EEVEE_shaders_probe_filter_glossy_sh_get(void)
+{
 	return e_data.probe_filter_glossy_sh;
 }
 
-GPUShader *EEVEE_shaders_probe_default_sh_get(void) {
+GPUShader *EEVEE_shaders_probe_default_sh_get(void)
+{
 	return e_data.probe_default_sh;
 }
 
-GPUShader *EEVEE_shaders_probe_filter_diffuse_sh_get(void) {
+GPUShader *EEVEE_shaders_probe_filter_diffuse_sh_get(void)
+{
 	return e_data.probe_filter_diffuse_sh;
 }
 
-GPUShader *EEVEE_shaders_probe_filter_visibility_sh_get(void) {
+GPUShader *EEVEE_shaders_probe_filter_visibility_sh_get(void)
+{
 	return e_data.probe_filter_visibility_sh;
 }
 
-GPUShader *EEVEE_shaders_probe_grid_fill_sh_get(void) {
+GPUShader *EEVEE_shaders_probe_grid_fill_sh_get(void)
+{
 	return e_data.probe_grid_fill_sh;
 }
 
-GPUShader *EEVEE_shaders_probe_planar_downsample_sh_get(void) {
+GPUShader *EEVEE_shaders_probe_planar_downsample_sh_get(void)
+{
 	return e_data.probe_planar_downsample_sh;
 }



More information about the Bf-blender-cvs mailing list