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

Campbell Barton noreply at git.blender.org
Thu May 5 22:29:37 CEST 2016


Commit: d12378da11f65187fab5e98d4c5ade568c781412
Author: Campbell Barton
Date:   Fri May 6 06:29:39 2016 +1000
Branches: master
https://developer.blender.org/rBd12378da11f65187fab5e98d4c5ade568c781412

Cleanup: style

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

M	source/blender/blenlib/intern/math_base_inline.c
M	source/blender/blenlib/intern/math_color_inline.c
M	source/blender/editors/curve/editcurve.c
M	source/blender/editors/curve/editcurve_paint.c
M	source/blender/editors/interface/interface_handlers.c
M	source/blender/editors/sculpt_paint/paint_image_proj.c
M	source/blender/editors/space_node/node_templates.c
M	source/blender/editors/transform/transform_snap_object.c
M	source/blender/imbuf/intern/imageprocess.c
M	source/blender/nodes/shader/nodes/node_shader_tex_environment.c
M	source/blender/nodes/shader/nodes/node_shader_texture.c

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

diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c
index fcd35de..8d2d80c 100644
--- a/source/blender/blenlib/intern/math_base_inline.c
+++ b/source/blender/blenlib/intern/math_base_inline.c
@@ -352,7 +352,7 @@ MALWAYS_INLINE __m128 _bli_math_improve_5throot_solution(
 	__m128 approx4 = _mm_mul_ps(approx2, approx2);
 	__m128 t = _mm_div_ps(x, approx4);
 	__m128 summ = _mm_add_ps(_mm_mul_ps(_mm_set1_ps(4.0f), old_result), t); /* fma */
-	return _mm_mul_ps(summ, _mm_set1_ps(1.0f/5.0f));
+	return _mm_mul_ps(summ, _mm_set1_ps(1.0f / 5.0f));
 }
 
 /* Calculate powf(x, 2.4). Working domain: 1e-10 < x < 1e+10 */
diff --git a/source/blender/blenlib/intern/math_color_inline.c b/source/blender/blenlib/intern/math_color_inline.c
index c268481..180d621 100644
--- a/source/blender/blenlib/intern/math_color_inline.c
+++ b/source/blender/blenlib/intern/math_color_inline.c
@@ -44,10 +44,10 @@
 MALWAYS_INLINE __m128 srgb_to_linearrgb_v4_simd(const __m128 c)
 {
 	__m128 cmp = _mm_cmplt_ps(c, _mm_set1_ps(0.04045f));
-	__m128 lt = _mm_max_ps(_mm_mul_ps(c, _mm_set1_ps(1.0f/12.92f)),
+	__m128 lt = _mm_max_ps(_mm_mul_ps(c, _mm_set1_ps(1.0f / 12.92f)),
 	                       _mm_set1_ps(0.0f));
 	__m128 gtebase = _mm_mul_ps(_mm_add_ps(c, _mm_set1_ps(0.055f)),
-	                            _mm_set1_ps(1.0f/1.055f)); /* fma */
+	                            _mm_set1_ps(1.0f / 1.055f)); /* fma */
 	__m128 gte = _bli_math_fastpow24(gtebase);
 	return _bli_math_blend_sse(cmp, lt, gte);
 }
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 91927fb..18fdcb5 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -5824,9 +5824,9 @@ static int curve_dissolve_exec(bContext *C, wmOperator *UNUSED(op))
 
 						for (int axis = 0; axis < dims; axis++) {
 							BKE_curve_forward_diff_bezier(
-									bezt_a->vec[1][axis], bezt_a->vec[2][axis],
-									bezt_b->vec[0][axis], bezt_b->vec[1][axis],
-									points_stride + axis, points_stride_len, dims * sizeof(float));
+							        bezt_a->vec[1][axis], bezt_a->vec[2][axis],
+							        bezt_b->vec[0][axis], bezt_b->vec[1][axis],
+							        points_stride + axis, points_stride_len, dims * sizeof(float));
 						}
 
 						points_stride += dims * points_stride_len;
diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c
index 014592e..9986dd1 100644
--- a/source/blender/editors/curve/editcurve_paint.c
+++ b/source/blender/editors/curve/editcurve_paint.c
@@ -485,7 +485,7 @@ static void curve_draw_stroke_3d(const struct bContext *UNUSED(C), ARegion *UNUS
 			        selem->location_local[2] - location_prev[2]);
 			location_prev = selem->location_local;
 			const float radius = stroke_elem_radius(cdd, selem);
-			gluSphere(qobj, radius , 12, 8);
+			gluSphere(qobj, radius, 12, 8);
 
 			location_prev = selem->location_local;
 		}
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index cddd779..2bca549 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -3393,7 +3393,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
 #ifdef WITH_INPUT_IME
 		    &&
 		    !is_ime_composing &&
-			(!WM_event_is_ime_switch(event) || !BLT_lang_is_ime_supported())
+		    (!WM_event_is_ime_switch(event) || !BLT_lang_is_ime_supported())
 #endif
 		    )
 		{
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 3df6750..d273f83 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -5866,7 +5866,7 @@ static int add_simple_uvs_exec(bContext *C, wmOperator *UNUSED(op))
 	ED_mesh_uv_texture_ensure(me, NULL);
 
 	BM_mesh_bm_from_me(
-	        bm, me,(&(struct BMeshFromMeshParams){
+	        bm, me, (&(struct BMeshFromMeshParams){
 	            .calc_face_normal = true,
 	        }));
 	/* select all uv loops first - pack parameters needs this to make sure charts are registered */
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c
index 9d1cf65..09594ab 100644
--- a/source/blender/editors/space_node/node_templates.c
+++ b/source/blender/editors/space_node/node_templates.c
@@ -423,8 +423,8 @@ static int ui_compatible_sockets(int typeA, int typeB)
 
 static int ui_node_item_name_compare(const void *a, const void *b)
 {
-	const bNodeType* type_a = *(const bNodeType**)a;
-	const bNodeType* type_b = *(const bNodeType**)b;
+	const bNodeType *type_a = *(const bNodeType **)a;
+	const bNodeType *type_b = *(const bNodeType **)b;
 	return BLI_natstrcmp(type_a->ui_name, type_b->ui_name);
 }
 
@@ -462,7 +462,7 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname)
 	}
 	NODE_TYPES_END
 
-	qsort(sorted_ntypes, BLI_array_count(sorted_ntypes), sizeof(bNodeType*), ui_node_item_name_compare);
+	qsort(sorted_ntypes, BLI_array_count(sorted_ntypes), sizeof(bNodeType *), ui_node_item_name_compare);
 
 	/* generate UI */
 	for (int j = 0; j < BLI_array_count(sorted_ntypes); j++) {
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c
index 1b1c2c9..ea34895 100644
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@ -958,8 +958,9 @@ static bool snapEditMesh(
 				hit.dist = local_depth;
 
 				if (treedata->tree &&
-					BLI_bvhtree_ray_cast(treedata->tree, ray_start_local, ray_normal_local, 0.0f,
-					        &hit, treedata->raycast_callback, treedata) != -1)
+				    BLI_bvhtree_ray_cast(
+				        treedata->tree, ray_start_local, ray_normal_local, 0.0f,
+				        &hit, treedata->raycast_callback, treedata) != -1)
 				{
 					hit.dist += len_diff;
 					hit.dist /= local_scale;
@@ -989,9 +990,9 @@ static bool snapEditMesh(
 				nearest.index = -1;
 				nearest.dist_sq = local_depth * local_depth;
 				if (treedata->tree &&
-					BLI_bvhtree_find_nearest_to_ray(
-					        treedata->tree, ray_start_local, ray_normal_local,
-					        &nearest, NULL, NULL) != -1)
+				    BLI_bvhtree_find_nearest_to_ray(
+				            treedata->tree, ray_start_local, ray_normal_local,
+				            &nearest, NULL, NULL) != -1)
 				{
 					const BMVert *v = BM_vert_at_index(em->bm, nearest.index);
 					retval = snapVertex(
@@ -1009,8 +1010,8 @@ static bool snapEditMesh(
 					BMEdge *eed = BM_edge_at_index(em->bm, i);
 
 					if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) &&
-						!BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) &&
-						!BM_elem_flag_test(eed->v2, BM_ELEM_SELECT))
+					    !BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) &&
+					    !BM_elem_flag_test(eed->v2, BM_ELEM_SELECT))
 					{
 						short v1no[3], v2no[3];
 						normal_float_to_short_v3(v1no, eed->v1->no);
diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c
index 7088819..0f5fd65 100644
--- a/source/blender/imbuf/intern/imageprocess.c
+++ b/source/blender/imbuf/intern/imageprocess.c
@@ -390,7 +390,7 @@ static void processor_apply_scanline_func(TaskPool * __restrict pool,
                                           void *taskdata,
                                           int UNUSED(threadid))
 {
-	ScanlineGlobalData *data = (ScanlineGlobalData*)BLI_task_pool_userdata(pool);
+	ScanlineGlobalData *data = BLI_task_pool_userdata(pool);
 	int start_scanline = GET_INT_FROM_POINTER(taskdata);
 	int num_scanlines = min_ii(data->scanlines_per_task,
 	                           data->total_scanlines - start_scanline);
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c
index 292221c..2f8f95b 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c
@@ -82,7 +82,7 @@ static int node_shader_gpu_tex_environment(GPUMaterial *mat, bNode *node, bNodeE
 		
 	ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, NULL);
 	if (ibuf && (ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA) == 0 &&
-		GPU_material_do_color_management(mat))
+	    GPU_material_do_color_management(mat))
 	{
 		GPU_link(mat, "srgb_to_linearrgb", out[0].link, &out[0].link);
 	}
diff --git a/source/blender/nodes/shader/nodes/node_shader_texture.c b/source/blender/nodes/shader/nodes/node_shader_texture.c
index 2ce38a0..6edf6c2 100644
--- a/source/blender/nodes/shader/nodes/node_shader_texture.c
+++ b/source/blender/nodes/shader/nodes/node_shader_texture.c
@@ -127,7 +127,7 @@ static int gpu_shader_texture(GPUMaterial *mat, bNode *node, bNodeExecData *UNUS
 
 		ImBuf *ibuf = BKE_image_acquire_ibuf(tex->ima, &tex->iuser, NULL);
 		if (ibuf && (ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA) == 0 &&
-			GPU_material_do_color_management(mat))
+		    GPU_material_do_color_management(mat))
 		{
 			GPU_link(mat, "srgb_to_linearrgb", out[1].link, &out[1].link);
 		}




More information about the Bf-blender-cvs mailing list