Cleanup: remove unused argument

This commit is contained in:
2019-05-18 22:28:31 +10:00
parent 53f77ae722
commit eddda5194c
5 changed files with 11 additions and 15 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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;