Fix __func__ being passed as an output string, also warnings

This commit is contained in:
Campbell Barton
2019-03-16 10:12:47 +11:00
parent 795bddf2bd
commit 44301175bb
3 changed files with 17 additions and 17 deletions

View File

@@ -2053,10 +2053,9 @@ static void draw_select_framebuffer_depth_only_setup(const rcti *rect)
g_select_buffer.texture_depth, 0, 0);
GPU_framebuffer_check_valid(
g_select_buffer.framebuffer_depth_only, __func__);
g_select_buffer.framebuffer_depth_only, NULL);
GPU_framebuffer_check_valid(
g_select_buffer.framebuffer_select_id, __func__);
g_select_buffer.framebuffer_select_id, NULL);
}
}
@@ -2085,7 +2084,7 @@ static void draw_select_framebuffer_select_id_setup(const rcti *rect)
g_select_buffer.texture_u32, 0, 0);
GPU_framebuffer_check_valid(
g_select_buffer.framebuffer_select_id, __func__);
g_select_buffer.framebuffer_select_id, NULL);
}
}

View File

@@ -365,9 +365,9 @@ int *mesh_get_x_mirror_faces(struct Object *ob, struct BMEditMesh *em, struct Me
int ED_mesh_mirror_get_vert(struct Object *ob, int index);
bool ED_mesh_pick_vert(struct bContext *C, struct Object *ob, const int mval[2], unsigned int *index, int dist_px, bool use_zbuf);
bool ED_mesh_pick_face(struct bContext *C, struct Object *ob, const int mval[2], unsigned int *index, int dist_px);
bool ED_mesh_pick_face_vert(struct bContext *C, struct Object *ob, const int mval[2], unsigned int *index, int dist_px);
bool ED_mesh_pick_vert(struct bContext *C, struct Object *ob, const int mval[2], uint *r_index, uint dist_px, bool use_zbuf);
bool ED_mesh_pick_face(struct bContext *C, struct Object *ob, const int mval[2], uint *r_index, uint dist_px);
bool ED_mesh_pick_face_vert(struct bContext *C, struct Object *ob, const int mval[2], uint *r_index, uint dist_px);
struct MDeformVert *ED_mesh_active_dvert_get_em(struct Object *ob, struct BMVert **r_eve);

View File

@@ -1014,7 +1014,7 @@ int *mesh_get_x_mirror_faces(Object *ob, BMEditMesh *em, Mesh *me_eval)
*
* \return boolean true == Found
*/
bool ED_mesh_pick_face(bContext *C, Object *ob, const int mval[2], unsigned int *index, int dist_px)
bool ED_mesh_pick_face(bContext *C, Object *ob, const int mval[2], unsigned int *index, uint dist_px)
{
ViewContext vc;
Mesh *me = ob->data;
@@ -1076,7 +1076,7 @@ static void ed_mesh_pick_face_vert__mpoly_find(
* Use when the back buffer stores face index values. but we want a vert.
* This gets the face then finds the closest vertex to mval.
*/
bool ED_mesh_pick_face_vert(bContext *C, Object *ob, const int mval[2], unsigned int *index, int dist_px)
bool ED_mesh_pick_face_vert(bContext *C, Object *ob, const int mval[2], uint *r_index, uint dist_px)
{
Depsgraph *depsgraph = CTX_data_depsgraph(C);
unsigned int poly_index;
@@ -1134,7 +1134,7 @@ bool ED_mesh_pick_face_vert(bContext *C, Object *ob, const int mval[2], unsigned
}
}
/* map 'dm -> me' index if possible */
/* map 'dm -> me' r_index if possible */
if (v_idx_best != ORIGINDEX_NONE) {
const int *index_mv_to_orig;
index_mv_to_orig = CustomData_get_layer(&me_eval->vdata, CD_ORIGINDEX);
@@ -1144,7 +1144,7 @@ bool ED_mesh_pick_face_vert(bContext *C, Object *ob, const int mval[2], unsigned
}
if ((v_idx_best != ORIGINDEX_NONE) && (v_idx_best < me->totvert)) {
*index = v_idx_best;
*r_index = v_idx_best;
return true;
}
}
@@ -1184,7 +1184,7 @@ static void ed_mesh_pick_vert__mapFunc(void *userData, int index, const float co
}
}
}
bool ED_mesh_pick_vert(bContext *C, Object *ob, const int mval[2], unsigned int *index, int dist_px, bool use_zbuf)
bool ED_mesh_pick_vert(bContext *C, Object *ob, const int mval[2], uint *r_index, uint dist_px, bool use_zbuf)
{
ViewContext vc;
Mesh *me = ob->data;
@@ -1203,18 +1203,19 @@ bool ED_mesh_pick_vert(bContext *C, Object *ob, const int mval[2], unsigned int
ED_view3d_select_id_validate(&vc);
*index = ED_view3d_select_id_read_nearest(
*r_index = ED_view3d_select_id_read_nearest(
&vc, mval, 1, me->totvert + 1, &dist_px);
}
else {
/* sample only on the exact position */
*index = ED_view3d_select_id_sample(&vc, mval[0], mval[1]);
*r_index = ED_view3d_select_id_sample(&vc, mval[0], mval[1]);
}
if ((*index) == 0 || (*index) > (unsigned int)me->totvert)
if ((*r_index) == 0 || (*r_index) > (uint)me->totvert) {
return false;
}
(*index)--;
(*r_index)--;
}
else {
Scene *scene_eval = DEG_get_evaluated_scene(vc.depsgraph);
@@ -1250,7 +1251,7 @@ bool ED_mesh_pick_vert(bContext *C, Object *ob, const int mval[2], unsigned int
return false;
}
*index = data.v_idx_best;
*r_index = data.v_idx_best;
}
return true;