[Bf-blender-cvs] [db09b57d4ee] master: Cleanup: use int instead of short for lasso array length

Campbell Barton noreply at git.blender.org
Tue May 5 08:27:46 CEST 2020


Commit: db09b57d4eedd372a5a995c7393ad6356fa734af
Author: Campbell Barton
Date:   Tue May 5 16:12:36 2020 +1000
Branches: master
https://developer.blender.org/rBdb09b57d4eedd372a5a995c7393ad6356fa734af

Cleanup: use int instead of short for lasso array length

There was no reason to use a short here,
this was just a convention from existing code.

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

M	source/blender/editors/include/ED_particle.h
M	source/blender/editors/mask/mask_select.c
M	source/blender/editors/physics/particle_edit.c
M	source/blender/editors/space_clip/tracking_select.c
M	source/blender/editors/space_node/node_select.c
M	source/blender/editors/space_view3d/view3d_select.c
M	source/blender/editors/uvedit/uvedit_select.c

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

diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h
index 6959cac7efe..789db5ae56e 100644
--- a/source/blender/editors/include/ED_particle.h
+++ b/source/blender/editors/include/ED_particle.h
@@ -72,7 +72,7 @@ bool PE_box_select(struct bContext *C, const struct rcti *rect, const int sel_op
 bool PE_circle_select(struct bContext *C, const int sel_op, const int mval[2], float rad);
 int PE_lasso_select(struct bContext *C,
                     const int mcoords[][2],
-                    const short moves,
+                    const int mcoords_len,
                     const int sel_op);
 bool PE_deselect_all_visible_ex(struct PTCacheEdit *edit);
 bool PE_deselect_all_visible(struct bContext *C);
diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c
index 416c1dc6e49..c8cddced99c 100644
--- a/source/blender/editors/mask/mask_select.c
+++ b/source/blender/editors/mask/mask_select.c
@@ -522,7 +522,7 @@ void MASK_OT_select_box(wmOperatorType *ot)
 
 static bool do_lasso_select_mask(bContext *C,
                                  const int mcoords[][2],
-                                 short mcoords_len,
+                                 const int mcoords_len,
                                  const eSelectOp sel_op)
 {
   ScrArea *area = CTX_wm_area(C);
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 604f66002c2..216dfe313c7 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -2252,7 +2252,7 @@ bool PE_circle_select(bContext *C, const int sel_op, const int mval[2], float ra
 
 /************************ lasso select operator ************************/
 
-int PE_lasso_select(bContext *C, const int mcoords[][2], const short mcoords_len, const int sel_op)
+int PE_lasso_select(bContext *C, const int mcoords[][2], const int mcoords_len, const int sel_op)
 {
   Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
   Scene *scene = CTX_data_scene(C);
diff --git a/source/blender/editors/space_clip/tracking_select.c b/source/blender/editors/space_clip/tracking_select.c
index 7f58f30d2d2..81cc858c69f 100644
--- a/source/blender/editors/space_clip/tracking_select.c
+++ b/source/blender/editors/space_clip/tracking_select.c
@@ -599,7 +599,7 @@ void CLIP_OT_select_box(wmOperatorType *ot)
 
 static int do_lasso_select_marker(bContext *C,
                                   const int mcoords[][2],
-                                  const short mcoords_len,
+                                  const int mcoords_len,
                                   bool select)
 {
   SpaceClip *sc = CTX_wm_space_clip(C);
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index 547abaf8809..c55b5510caf 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -768,7 +768,7 @@ static int node_lasso_select_invoke(bContext *C, wmOperator *op, const wmEvent *
 
 static bool do_lasso_select_node(bContext *C,
                                  const int mcoords[][2],
-                                 short mcoords_len,
+                                 const int mcoords_len,
                                  eSelectOp sel_op)
 {
   SpaceNode *snode = CTX_wm_space_node(C);
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 97e7cf32a41..69425bea364 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -558,7 +558,7 @@ static void do_lasso_select_pose__do_tag(void *userData,
 static void do_lasso_tag_pose(ViewContext *vc,
                               Object *ob,
                               const int mcoords[][2],
-                              short mcoords_len)
+                              const int mcoords_len)
 {
   ViewContext vc_tmp;
   LassoSelectUserData data;
@@ -582,7 +582,7 @@ static void do_lasso_tag_pose(ViewContext *vc,
 
 static bool do_lasso_select_objects(ViewContext *vc,
                                     const int mcoords[][2],
-                                    const short mcoords_len,
+                                    const int mcoords_len,
                                     const eSelectOp sel_op)
 {
   View3D *v3d = vc->v3d;
@@ -693,7 +693,7 @@ static bool do_pose_tag_select_op_exec(Base **bases, const uint bases_len, const
 
 static bool do_lasso_select_pose(ViewContext *vc,
                                  const int mcoords[][2],
-                                 const short mcoords_len,
+                                 const int mcoords_len,
                                  const eSelectOp sel_op)
 {
   uint bases_len;
@@ -813,7 +813,7 @@ static void do_lasso_select_mesh__doSelectFace(void *userData,
 static bool do_lasso_select_mesh(ViewContext *vc,
                                  wmGenericUserData *wm_userdata,
                                  const int mcoords[][2],
-                                 short mcoords_len,
+                                 const int mcoords_len,
                                  const eSelectOp sel_op)
 {
   LassoSelectUserData data;
@@ -942,7 +942,7 @@ static void do_lasso_select_curve__doSelect(void *userData,
 
 static bool do_lasso_select_curve(ViewContext *vc,
                                   const int mcoords[][2],
-                                  short mcoords_len,
+                                  const int mcoords_len,
                                   const eSelectOp sel_op)
 {
   LassoSelectUserData data;
@@ -981,7 +981,7 @@ static void do_lasso_select_lattice__doSelect(void *userData, BPoint *bp, const
 }
 static bool do_lasso_select_lattice(ViewContext *vc,
                                     const int mcoords[][2],
-                                    short mcoords_len,
+                                    const int mcoords_len,
                                     const eSelectOp sel_op)
 {
   LassoSelectUserData data;
@@ -1051,7 +1051,7 @@ static void do_lasso_select_armature__doSelectBone(void *userData,
 
 static bool do_lasso_select_armature(ViewContext *vc,
                                      const int mcoords[][2],
-                                     short mcoords_len,
+                                     const int mcoords_len,
                                      const eSelectOp sel_op)
 {
   LassoSelectUserData data;
@@ -1100,7 +1100,7 @@ static void do_lasso_select_mball__doSelectElem(void *userData,
 }
 static bool do_lasso_select_meta(ViewContext *vc,
                                  const int mcoords[][2],
-                                 short mcoords_len,
+                                 const int mcoords_len,
                                  const eSelectOp sel_op)
 {
   LassoSelectUserData data;
@@ -1144,7 +1144,7 @@ static void do_lasso_select_meshobject__doSelectVert(void *userData,
 static bool do_lasso_select_paintvert(ViewContext *vc,
                                       wmGenericUserData *wm_userdata,
                                       const int mcoords[][2],
-                                      short mcoords_len,
+                                      const int mcoords_len,
                                       const eSelectOp sel_op)
 {
   const bool use_zbuf = !XRAY_ENABLED(vc->v3d);
@@ -1205,7 +1205,7 @@ static bool do_lasso_select_paintvert(ViewContext *vc,
 static bool do_lasso_select_paintface(ViewContext *vc,
                                       wmGenericUserData *wm_userdata,
                                       const int mcoords[][2],
-                                      short mcoords_len,
+                                      const int mcoords_len,
                                       const eSelectOp sel_op)
 {
   Object *ob = vc->obact;
@@ -1243,7 +1243,7 @@ static bool do_lasso_select_paintface(ViewContext *vc,
 }
 
 #if 0
-static void do_lasso_select_node(int mcoords[][2], short mcoords_len, const eSelectOp sel_op)
+static void do_lasso_select_node(int mcoords[][2], const int mcoords_len, const eSelectOp sel_op)
 {
   SpaceNode *snode = area->spacedata.first;
 
@@ -1279,7 +1279,7 @@ static void do_lasso_select_node(int mcoords[][2], short mcoords_len, const eSel
 static bool view3d_lasso_select(bContext *C,
                                 ViewContext *vc,
                                 const int mcoords[][2],
-                                short mcoords_len,
+                                const int mcoords_len,
                                 const eSelectOp sel_op)
 {
   Object *ob = CTX_data_active_object(C);
diff --git a/source/blender/editors/uvedit/uvedit_select.c b/source/blender/editors/uvedit/uvedit_select.c
index 06866195c1c..6e931b56a85 100644
--- a/source/blender/editors/uvedit/uvedit_select.c
+++ b/source/blender/editors/uvedit/uvedit_select.c
@@ -2915,7 +2915,7 @@ static bool do_lasso_select_mesh_uv_is_point_inside(const ARegion *region,
 
 static bool do_lasso_select_mesh_uv(bContext *C,
                                     const int mcoords[][2],
-                                    short mcoords_len,
+                                    const int mcoords_len,
                                     const eSelectOp sel_op)
 {
   Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);



More information about the Bf-blender-cvs mailing list