[Bf-blender-cvs] [eddda5194c3] master: Cleanup: remove unused argument

Campbell Barton noreply at git.blender.org
Sat May 18 15:58:59 CEST 2019


Commit: eddda5194c3bba07259a455c61016ed1fc93de5d
Author: Campbell Barton
Date:   Sat May 18 22:28:31 2019 +1000
Branches: master
https://developer.blender.org/rBeddda5194c3bba07259a455c61016ed1fc93de5d

Cleanup: remove unused argument

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

M	source/blender/editors/include/ED_view3d.h
M	source/blender/editors/mesh/editface.c
M	source/blender/editors/mesh/editmesh_select.c
M	source/blender/editors/space_view3d/view3d_draw_legacy.c
M	source/blender/editors/space_view3d/view3d_select.c

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

diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index cd4cefe8891..2b8f926fc2c 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -452,11 +452,8 @@ void ED_view3d_select_id_validate(struct ViewContext *vc);
 void ED_view3d_select_id_validate_with_select_mode(struct ViewContext *vc, short select_mode);
 
 uint ED_view3d_select_id_sample(struct ViewContext *vc, int x, int y);
-uint *ED_view3d_select_id_read(
-    struct ViewContext *vc, int xmin, int ymin, int xmax, int ymax, uint *r_buf_len);
-uint *ED_view3d_select_id_read_rect(struct ViewContext *vc,
-                                    const struct rcti *rect,
-                                    uint *r_buf_len);
+uint *ED_view3d_select_id_read(int xmin, int ymin, int xmax, int ymax, uint *r_buf_len);
+uint *ED_view3d_select_id_read_rect(const struct rcti *rect, uint *r_buf_len);
 uint ED_view3d_select_id_read_nearest(
     struct ViewContext *vc, const int mval[2], const uint min, const uint max, uint *r_dist);
 
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index fdbcc3449b2..ada44f9a77a 100644
--- a/source/blender/editors/mesh/editface.c
+++ b/source/blender/editors/mesh/editface.c
@@ -467,7 +467,7 @@ bool do_paintface_box_select(ViewContext *vc, const rcti *rect, int sel_op)
     char *selar = MEM_callocN(me->totpoly + 1, "selar");
 
     ED_view3d_select_id_validate(vc);
-    buf = ED_view3d_select_id_read_rect(vc, rect, &buf_len);
+    buf = ED_view3d_select_id_read_rect(rect, &buf_len);
 
     rt = buf;
 
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 485d855e18e..372ff42f1c3 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -350,7 +350,7 @@ bool EDBM_backbuf_border_init(ViewContext *vc, short xmin, short ymin, short xma
   }
 
   ED_view3d_select_id_validate(vc);
-  buf = ED_view3d_select_id_read(vc, xmin, ymin, xmax, ymax, &buf_len);
+  buf = ED_view3d_select_id_read(xmin, ymin, xmax, ymax, &buf_len);
   if ((buf == NULL) || (bm_vertoffs == 0)) {
     return false;
   }
@@ -437,7 +437,7 @@ bool EDBM_backbuf_border_mask_init(ViewContext *vc,
   }
 
   ED_view3d_select_id_validate(vc);
-  buf = ED_view3d_select_id_read(vc, xmin, ymin, xmax, ymax, &buf_len);
+  buf = ED_view3d_select_id_read(xmin, ymin, xmax, ymax, &buf_len);
   if ((buf == NULL) || (bm_vertoffs == 0)) {
     return false;
   }
@@ -490,7 +490,7 @@ bool EDBM_backbuf_circle_init(ViewContext *vc, short xs, short ys, short rads)
   ymax = ys + rads;
 
   ED_view3d_select_id_validate(vc);
-  buf = ED_view3d_select_id_read(vc, xmin, ymin, xmax, ymax, NULL);
+  buf = ED_view3d_select_id_read(xmin, ymin, xmax, ymax, NULL);
   if ((buf == NULL) || (bm_vertoffs == 0)) {
     return false;
   }
diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c
index e0dbe1f6543..3443f333234 100644
--- a/source/blender/editors/space_view3d/view3d_draw_legacy.c
+++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c
@@ -281,7 +281,7 @@ void ED_view3d_backbuf_depth_validate(ViewContext *vc)
   }
 }
 
-uint *ED_view3d_select_id_read_rect(ViewContext *UNUSED(vc), const rcti *clip, uint *r_buf_len)
+uint *ED_view3d_select_id_read_rect(const rcti *clip, uint *r_buf_len)
 {
   uint width = BLI_rcti_size_x(clip);
   uint height = BLI_rcti_size_y(clip);
@@ -314,7 +314,7 @@ uint ED_view3d_select_id_sample(ViewContext *vc, int x, int y)
   }
 
   uint buf_len;
-  uint *buf = ED_view3d_select_id_read(vc, x, y, x, y, &buf_len);
+  uint *buf = ED_view3d_select_id_read(x, y, x, y, &buf_len);
   BLI_assert(0 != buf_len);
   uint ret = buf[0];
   MEM_freeN(buf);
@@ -323,8 +323,7 @@ uint ED_view3d_select_id_sample(ViewContext *vc, int x, int y)
 }
 
 /* reads full rect, converts indices */
-uint *ED_view3d_select_id_read(
-    ViewContext *vc, int xmin, int ymin, int xmax, int ymax, uint *r_buf_len)
+uint *ED_view3d_select_id_read(int xmin, int ymin, int xmax, int ymax, uint *r_buf_len)
 {
   if (UNLIKELY((xmin > xmax) || (ymin > ymax))) {
     return NULL;
@@ -338,7 +337,7 @@ uint *ED_view3d_select_id_read(
   };
 
   uint buf_len;
-  uint *buf = ED_view3d_select_id_read_rect(vc, &rect, &buf_len);
+  uint *buf = ED_view3d_select_id_read_rect(&rect, &buf_len);
 
   if (r_buf_len) {
     *r_buf_len = buf_len;
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 419ec87eec8..a93c14fa1ef 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -2363,7 +2363,7 @@ static bool do_paintvert_box_select(ViewContext *vc, const rcti *rect, const eSe
     selar = MEM_callocN(me->totvert + 1, "selar");
 
     ED_view3d_select_id_validate(vc);
-    buf = ED_view3d_select_id_read_rect(vc, rect, &buf_len);
+    buf = ED_view3d_select_id_read_rect(rect, &buf_len);
 
     rt = buf;



More information about the Bf-blender-cvs mailing list