[Bf-blender-cvs] [bdc41ca] master: Code cleanup: Move output arguments to the end of the list

Sergey Sharybin noreply at git.blender.org
Mon Oct 13 18:06:37 CEST 2014


Commit: bdc41ca756ab48f0a83b4fd97560969521b4b433
Author: Sergey Sharybin
Date:   Mon Oct 13 18:06:18 2014 +0200
Branches: master
https://developer.blender.org/rBbdc41ca756ab48f0a83b4fd97560969521b4b433

Code cleanup: Move output arguments to the end of the list

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

M	source/blender/editors/mask/mask_add.c
M	source/blender/editors/mask/mask_intern.h
M	source/blender/editors/mask/mask_ops.c

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

diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c
index cd6e937..cb47adb 100644
--- a/source/blender/editors/mask/mask_add.c
+++ b/source/blender/editors/mask/mask_add.c
@@ -57,12 +57,13 @@ bool ED_mask_find_nearest_diff_point(const bContext *C,
                                      struct Mask *mask,
                                      const float normal_co[2],
                                      int threshold, bool feather,
+                                     float tangent[2],
+                                     const bool use_deform,
+                                     const bool use_project,
                                      MaskLayer **masklay_r,
                                      MaskSpline **spline_r,
                                      MaskSplinePoint **point_r,
-                                     float *u_r, float tangent[2],
-                                     const bool use_deform,
-                                     const bool use_project,
+                                     float *u_r,
                                      float *score_r)
 {
 	ScrArea *sa = CTX_wm_area(C);
@@ -344,7 +345,9 @@ static bool add_vertex_subdivide(const bContext *C, Mask *mask, const float co[2
 	float tangent[2];
 	float u;
 
-	if (ED_mask_find_nearest_diff_point(C, mask, co, threshold, false, &masklay, &spline, &point, &u, tangent, true, true, NULL)) {
+	if (ED_mask_find_nearest_diff_point(C, mask, co, threshold, false, tangent, true, true,
+	                                    &masklay, &spline, &point, &u, NULL))
+	{
 		MaskSplinePoint *new_point;
 		int point_index = point - spline->points;
 
@@ -629,7 +632,9 @@ static int add_feather_vertex_exec(bContext *C, wmOperator *op)
 	if (point)
 		return OPERATOR_FINISHED;
 
-	if (ED_mask_find_nearest_diff_point(C, mask, co, threshold, true, &masklay, &spline, &point, &u, NULL, true, true, NULL)) {
+	if (ED_mask_find_nearest_diff_point(C, mask, co, threshold, true, NULL, true, true,
+	                                    &masklay, &spline, &point, &u, NULL))
+	{
 		Scene *scene = CTX_data_scene(C);
 		float w = BKE_mask_point_weight(spline, point, u);
 		float weight_scalar = BKE_mask_point_weight_scalar(spline, point, u);
diff --git a/source/blender/editors/mask/mask_intern.h b/source/blender/editors/mask/mask_intern.h
index af91afe..5cdb224 100644
--- a/source/blender/editors/mask/mask_intern.h
+++ b/source/blender/editors/mask/mask_intern.h
@@ -44,12 +44,13 @@ bool ED_mask_find_nearest_diff_point(const struct bContext *C,
                                      struct Mask *mask,
                                      const float normal_co[2],
                                      int threshold, bool feather,
+                                     float tangent[2],
+                                     const bool use_deform,
+                                     const bool use_project,
                                      struct MaskLayer **masklay_r,
                                      struct MaskSpline **spline_r,
                                      struct MaskSplinePoint **point_r,
-                                     float *u_r, float tangent[2],
-                                     const bool use_deform,
-                                     const bool use_project,
+                                     float *u_r,
                                      float *score_r);
 
 void MASK_OT_add_vertex(struct wmOperatorType *ot);
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index 486704c..93e59f3 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -583,9 +583,10 @@ static bool spline_under_mouse_get(const bContext *C,
 	}
 	if (closest_dist_squared < SQUARE(threshold) && closest_spline != NULL) {
 		float diff_score;
-		if (ED_mask_find_nearest_diff_point(C, mask, co, threshold, false,
+		if (ED_mask_find_nearest_diff_point(C, mask, co, threshold,
+		                                    false, NULL, true, false,
 		                                    NULL, NULL, NULL, NULL,
-		                                    NULL, true, false, &diff_score))
+		                                    &diff_score))
 		{
 			if (SQUARE(diff_score) < closest_dist_squared) {
 				return false;
@@ -1206,8 +1207,9 @@ static SlideSplineCurvatureData *slide_spline_curvature_customdata(
 	ED_mask_mouse_pos(CTX_wm_area(C), CTX_wm_region(C), event->mval, co);
 
 	if (!ED_mask_find_nearest_diff_point(C, mask, co, threshold, false,
+	                                     NULL, true, false,
 	                                     &mask_layer, &spline, &point, &u,
-	                                     NULL, true, false, NULL))
+	                                     NULL))
 	{
 		return NULL;
 	}




More information about the Bf-blender-cvs mailing list