[Bf-blender-cvs] [b26fb53] master: Cleanup: style, indentation

Campbell Barton noreply at git.blender.org
Mon Dec 28 15:15:46 CET 2015


Commit: b26fb531f3699d384775703e7da7277a5b2eb1bd
Author: Campbell Barton
Date:   Tue Dec 29 01:08:13 2015 +1100
Branches: master
https://developer.blender.org/rBb26fb531f3699d384775703e7da7277a5b2eb1bd

Cleanup: style, indentation

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

M	source/blender/blenkernel/intern/seqmodifier.c
M	source/blender/collada/DocumentExporter.cpp
M	source/blender/editors/space_view3d/view3d_edit.c
M	source/blender/editors/space_view3d/view3d_view.c

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

diff --git a/source/blender/blenkernel/intern/seqmodifier.c b/source/blender/blenkernel/intern/seqmodifier.c
index f12faac..e7a252b 100644
--- a/source/blender/blenkernel/intern/seqmodifier.c
+++ b/source/blender/blenkernel/intern/seqmodifier.c
@@ -184,7 +184,7 @@ static void whiteBalance_init_data(SequenceModifierData *smd)
 }
 
 typedef struct WhiteBalanceThreadData {
-	struct ColorSpace* colorspace;
+	struct ColorSpace *colorspace;
 	float white[3];
 } WhiteBalanceThreadData;
 
@@ -196,19 +196,19 @@ static void whiteBalance_apply_threaded(int width, int height, unsigned char *re
 
 	WhiteBalanceThreadData *data = (WhiteBalanceThreadData *) data_v;
 
-	multiplier[0] = 1.0f/data->white[0];
-	multiplier[1] = 1.0f/data->white[1];
-	multiplier[2] = 1.0f/data->white[2];
+	multiplier[0] = 1.0f / data->white[0];
+	multiplier[1] = 1.0f / data->white[1];
+	multiplier[2] = 1.0f / data->white[2];
 
 	for (y = 0; y < height; y++) {
 		for (x = 0; x < width; x++) {
 			int pixel_index = (y * width + x) * 4;
 			float result[3], mask[3] = {1.0f, 1.0f, 1.0f};
 
-			if (rect_float)
+			if (rect_float) {
 				copy_v3_v3(result, rect_float + pixel_index);
-			else
-			{
+			}
+			else {
 				straight_uchar_to_premul_float(result, rect + pixel_index);
 				IMB_colormanagement_colorspace_to_scene_linear_v3(result, data->colorspace);
 			}
@@ -228,8 +228,8 @@ static void whiteBalance_apply_threaded(int width, int height, unsigned char *re
 				copy_v3_v3(rect_float + pixel_index, result);
 			else
 				IMB_colormanagement_scene_linear_to_colorspace_v3(result, data->colorspace);
-				premul_float_to_straight_uchar(rect + pixel_index, result);
-			}
+			premul_float_to_straight_uchar(rect + pixel_index, result);
+		}
 	}
 }
 
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp
index 3ade7c3..1348d7e 100644
--- a/source/blender/collada/DocumentExporter.cpp
+++ b/source/blender/collada/DocumentExporter.cpp
@@ -159,7 +159,7 @@ static COLLADABU::NativeString make_temp_filepath(const char *name, const char *
 	char tempfile[FILE_MAX];
 	const char *tempdir = BKE_tempdir_session();
 
-	if (name == NULL){
+	if (name == NULL) {
 		name = tmpnam(NULL);
 	}
 
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index f759a0e..4ffcd24 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -2882,14 +2882,14 @@ static void view3d_from_minmax(bContext *C, View3D *v3d, ARegion *ar,
 		rv3d->persp = RV3D_PERSP;
 		ED_view3d_smooth_view(
 		        C, v3d, ar, smooth_viewtx,
-		        &(const V3D_SmoothParams){
+		        &(const V3D_SmoothParams) {
 		            .camera_old = v3d->camera, .ofs = new_ofs,
 		            .dist = ok_dist ? &new_dist : NULL});
 	}
 	else {
 		ED_view3d_smooth_view(
 		        C, v3d, ar, smooth_viewtx,
-		        &(const V3D_SmoothParams){.ofs = new_ofs, .dist = ok_dist ? &new_dist : NULL});
+		        &(const V3D_SmoothParams) {.ofs = new_ofs, .dist = ok_dist ? &new_dist : NULL});
 	}
 
 	/* smooth view does viewlock RV3D_BOXVIEW copy */
@@ -3200,7 +3200,7 @@ static int viewcenter_cursor_exec(bContext *C, wmOperator *op)
 		negate_v3_v3(new_ofs, ED_view3d_cursor3d_get(scene, v3d));
 		ED_view3d_smooth_view(
 		        C, v3d, ar, smooth_viewtx,
-		        &(const V3D_SmoothParams){.ofs = new_ofs});
+		        &(const V3D_SmoothParams) {.ofs = new_ofs});
 
 		/* smooth view does viewlock RV3D_BOXVIEW copy */
 	}
@@ -3247,7 +3247,7 @@ static int viewcenter_pick_invoke(bContext *C, wmOperator *op, const wmEvent *ev
 		negate_v3(new_ofs);
 		ED_view3d_smooth_view(
 		        C, v3d, ar, smooth_viewtx,
-		        &(const V3D_SmoothParams){.ofs = new_ofs});
+		        &(const V3D_SmoothParams) {.ofs = new_ofs});
 	}
 
 	return OPERATOR_FINISHED;
@@ -3632,7 +3632,7 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op)
 
 	ED_view3d_smooth_view(
 	        C, v3d, ar, smooth_viewtx,
-	        &(const V3D_SmoothParams){.ofs = new_ofs, .dist = &new_dist});
+	        &(const V3D_SmoothParams) {.ofs = new_ofs, .dist = &new_dist});
 
 	if (rv3d->viewlock & RV3D_BOXVIEW)
 		view3d_boxview_sync(CTX_wm_area(C), ar);
@@ -3789,7 +3789,7 @@ static void axis_set_view(bContext *C, View3D *v3d, ARegion *ar,
 		/* to camera */
 		ED_view3d_smooth_view(
 		        C, v3d, ar, smooth_viewtx,
-		        &(const V3D_SmoothParams){.camera_old = v3d->camera, .ofs = rv3d->ofs, .quat = quat});
+		        &(const V3D_SmoothParams) {.camera_old = v3d->camera, .ofs = rv3d->ofs, .quat = quat});
 	}
 	else if (orig_persp == RV3D_CAMOB && v3d->camera) {
 		/* from camera */
@@ -3803,7 +3803,7 @@ static void axis_set_view(bContext *C, View3D *v3d, ARegion *ar,
 
 		ED_view3d_smooth_view(
 		        C, v3d, ar, smooth_viewtx,
-		        &(const V3D_SmoothParams){.ofs = ofs, .quat = quat, .dist = &dist});
+		        &(const V3D_SmoothParams) {.ofs = ofs, .quat = quat, .dist = &dist});
 	}
 	else {
 		/* rotate around selection */
@@ -3820,7 +3820,7 @@ static void axis_set_view(bContext *C, View3D *v3d, ARegion *ar,
 		/* no camera involved */
 		ED_view3d_smooth_view(
 		        C, v3d, ar, smooth_viewtx,
-		        &(const V3D_SmoothParams){.quat = quat, .dyn_ofs = dyn_ofs_pt});
+		        &(const V3D_SmoothParams) {.quat = quat, .dyn_ofs = dyn_ofs_pt});
 	}
 }
 
@@ -3911,7 +3911,7 @@ static int viewnumpad_exec(bContext *C, wmOperator *op)
 				rv3d->persp = RV3D_CAMOB;
 				ED_view3d_smooth_view(
 				        C, v3d, ar, smooth_viewtx,
-				        &(const V3D_SmoothParams){
+				        &(const V3D_SmoothParams) {
 				            .camera = v3d->camera, .ofs = rv3d->ofs, .quat = rv3d->viewquat,
 				            .dist = &rv3d->dist, .lens = &v3d->lens});
 
@@ -4040,7 +4040,7 @@ static int vieworbit_exec(bContext *C, wmOperator *op)
 
 			ED_view3d_smooth_view(
 			        C, v3d, ar, smooth_viewtx,
-			        &(const V3D_SmoothParams){.quat = quat_new, .dyn_ofs = dyn_ofs_pt});
+			        &(const V3D_SmoothParams) {.quat = quat_new, .dyn_ofs = dyn_ofs_pt});
 
 			return OPERATOR_FINISHED;
 		}
@@ -4220,7 +4220,7 @@ static int viewroll_exec(bContext *C, wmOperator *op)
 
 		ED_view3d_smooth_view(
 		        C, v3d, ar, smooth_viewtx,
-		        &(const V3D_SmoothParams){.quat = quat_new, .dyn_ofs = dyn_ofs_pt});
+		        &(const V3D_SmoothParams) {.quat = quat_new, .dyn_ofs = dyn_ofs_pt});
 
 		viewops_data_free(C, op);
 		return OPERATOR_FINISHED;
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 67504b2..305b4a3 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -590,7 +590,7 @@ static int view3d_setobjectascamera_exec(bContext *C, wmOperator *op)
 
 			ED_view3d_smooth_view(
 			        C, v3d, ar, smooth_viewtx,
-			        &(const V3D_SmoothParams){
+			        &(const V3D_SmoothParams) {
 			            .camera_old = camera_old, .camera = v3d->camera,
 			            .ofs = rv3d->ofs, .quat = rv3d->viewquat,
 			            .dist = &rv3d->dist, .lens = &v3d->lens});
@@ -1324,7 +1324,7 @@ static bool view3d_localview_init(
 
 				ED_view3d_smooth_view_ex(
 				        wm, win, sa, v3d, ar, smooth_viewtx,
-				            &(const V3D_SmoothParams){
+				            &(const V3D_SmoothParams) {
 				                .camera_old = camera_old,
 				                .ofs = ofs_new, .quat = rv3d->viewquat,
 				                .dist = ok_dist ? &dist_new : NULL, .lens = &v3d->lens});
@@ -1389,7 +1389,7 @@ static void restore_localviewdata(wmWindowManager *wm, wmWindow *win, Main *bmai
 				ED_view3d_smooth_view_ex(
 				        wm, win, sa,
 				        v3d, ar, smooth_viewtx,
-				        &(const V3D_SmoothParams){
+				        &(const V3D_SmoothParams) {
 				            .camera_old = camera_old_rv3d, .camera = camera_new_rv3d,
 				            .ofs = rv3d->localvd->ofs, .quat = rv3d->localvd->viewquat,
 				            .dist = &rv3d->localvd->dist});




More information about the Bf-blender-cvs mailing list