diff options
author | Hans Goudey <h.goudey@me.com> | 2022-10-04 01:37:25 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-10-04 01:38:16 +0300 |
commit | 97746129d5870beedc40e3c035c7982ce8a6bebc (patch) | |
tree | b819b8e7875e6684aad7ea1f6bb7922d4fa1c8fc /source/blender/editors/mesh | |
parent | ed7f5713f8f9d605e3cd4cce42e40fb5c6bf4bf5 (diff) |
Cleanup: replace UNUSED macro with commented args in C++ code
This is the conventional way of dealing with unused arguments in C++,
since it works on all compilers.
Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.cc | 14 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_data.cc | 32 | ||||
-rw-r--r-- | source/blender/editors/mesh/meshtools.cc | 2 |
3 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.cc b/source/blender/editors/mesh/editmesh_select.cc index 675540bea73..86e104359f3 100644 --- a/source/blender/editors/mesh/editmesh_select.cc +++ b/source/blender/editors/mesh/editmesh_select.cc @@ -373,7 +373,7 @@ static void find_nearest_edge_center__doZBuf(void *userData, BMEdge *eed, const float screen_co_a[2], const float screen_co_b[2], - int UNUSED(index)) + int /*index*/) { NearestEdgeUserData_ZBuf *data = static_cast<NearestEdgeUserData_ZBuf *>(userData); @@ -628,7 +628,7 @@ struct NearestFaceUserData_ZBuf { static void find_nearest_face_center__doZBuf(void *userData, BMFace *efa, const float screen_co[2], - int UNUSED(index)) + int /*index*/) { NearestFaceUserData_ZBuf *data = static_cast<NearestFaceUserData_ZBuf *>(userData); @@ -1378,8 +1378,8 @@ static int edbm_select_mode_invoke(bContext *C, wmOperator *op, const wmEvent *e return edbm_select_mode_exec(C, op); } -static char *edbm_select_mode_get_description(bContext *UNUSED(C), - wmOperatorType *UNUSED(op), +static char *edbm_select_mode_get_description(bContext * /*C*/, + wmOperatorType * /*op*/, PointerRNA *values) { const int type = RNA_enum_get(values, "type"); @@ -1976,7 +1976,7 @@ void MESH_OT_select_all(wmOperatorType *ot) /** \name Select Interior Faces Operator * \{ */ -static int edbm_faces_select_interior_exec(bContext *C, wmOperator *UNUSED(op)) +static int edbm_faces_select_interior_exec(bContext *C, wmOperator * /*op*/) { const Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); @@ -2797,7 +2797,7 @@ struct BMFaceLink { float area; }; -static bool bm_interior_loop_filter_fn(const BMLoop *l, void *UNUSED(user_data)) +static bool bm_interior_loop_filter_fn(const BMLoop *l, void * /*user_data*/) { if (BM_elem_flag_test(l->e, BM_ELEM_TAG)) { return false; @@ -5054,7 +5054,7 @@ void MESH_OT_select_axis(wmOperatorType *ot) /** \name Select Region to Loop Operator * \{ */ -static int edbm_region_to_loop_exec(bContext *C, wmOperator *UNUSED(op)) +static int edbm_region_to_loop_exec(bContext *C, wmOperator * /*op*/) { const Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); diff --git a/source/blender/editors/mesh/mesh_data.cc b/source/blender/editors/mesh/mesh_data.cc index ea03117a525..9dec3583763 100644 --- a/source/blender/editors/mesh/mesh_data.cc +++ b/source/blender/editors/mesh/mesh_data.cc @@ -378,7 +378,7 @@ int ED_mesh_color_add(Mesh *me, const char *name, const bool active_set, const bool do_init, - ReportList *UNUSED(reports)) + ReportList * /*reports*/) { /* NOTE: keep in sync with #ED_mesh_uv_add. */ @@ -464,7 +464,7 @@ static bool layers_poll(bContext *C) int ED_mesh_sculpt_color_add(Mesh *me, const char *name, const bool do_init, - ReportList *UNUSED(reports)) + ReportList * /*reports*/) { /* NOTE: keep in sync with #ED_mesh_uv_add. */ @@ -566,7 +566,7 @@ void MESH_OT_uv_texture_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -static int mesh_uv_texture_remove_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_uv_texture_remove_exec(bContext *C, wmOperator * /*op*/) { Object *ob = ED_object_context(C); Mesh *me = static_cast<Mesh *>(ob->data); @@ -673,7 +673,7 @@ static bool mesh_customdata_mask_clear_poll(bContext *C) } return false; } -static int mesh_customdata_mask_clear_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_customdata_mask_clear_exec(bContext *C, wmOperator * /*op*/) { int ret_a = mesh_customdata_clear_exec__internal(C, BM_VERT, CD_PAINT_MASK); int ret_b = mesh_customdata_clear_exec__internal(C, BM_LOOP, CD_GRID_PAINT_MASK); @@ -724,7 +724,7 @@ static bool mesh_customdata_skin_add_poll(bContext *C) return (mesh_customdata_skin_state(C) == 0); } -static int mesh_customdata_skin_add_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_customdata_skin_add_exec(bContext *C, wmOperator * /*op*/) { Object *ob = ED_object_context(C); Mesh *me = static_cast<Mesh *>(ob->data); @@ -757,7 +757,7 @@ static bool mesh_customdata_skin_clear_poll(bContext *C) return (mesh_customdata_skin_state(C) == 1); } -static int mesh_customdata_skin_clear_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_customdata_skin_clear_exec(bContext *C, wmOperator * /*op*/) { return mesh_customdata_clear_exec__internal(C, BM_VERT, CD_MVERT_SKIN); } @@ -778,7 +778,7 @@ void MESH_OT_customdata_skin_clear(wmOperatorType *ot) } /* Clear custom loop normals */ -static int mesh_customdata_custom_splitnormals_add_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_customdata_custom_splitnormals_add_exec(bContext *C, wmOperator * /*op*/) { Mesh *me = ED_mesh_context(C); @@ -841,7 +841,7 @@ void MESH_OT_customdata_custom_splitnormals_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -static int mesh_customdata_custom_splitnormals_clear_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_customdata_custom_splitnormals_clear_exec(bContext *C, wmOperator * /*op*/) { Mesh *me = ED_mesh_context(C); @@ -891,7 +891,7 @@ static bool mesh_customdata_bevel_weight_vertex_add_poll(bContext *C) return mesh_customdata_bevel_weight_vertex_state(C) == 0; } -static int mesh_customdata_bevel_weight_vertex_add_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_customdata_bevel_weight_vertex_add_exec(bContext *C, wmOperator * /*op*/) { return mesh_customdata_add_exec__internal(C, BM_VERT, CD_BWEIGHT); } @@ -913,7 +913,7 @@ static bool mesh_customdata_bevel_weight_vertex_clear_poll(bContext *C) return (mesh_customdata_bevel_weight_vertex_state(C) == 1); } -static int mesh_customdata_bevel_weight_vertex_clear_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_customdata_bevel_weight_vertex_clear_exec(bContext *C, wmOperator * /*op*/) { return mesh_customdata_clear_exec__internal(C, BM_VERT, CD_BWEIGHT); } @@ -951,7 +951,7 @@ static bool mesh_customdata_bevel_weight_edge_add_poll(bContext *C) return mesh_customdata_bevel_weight_edge_state(C) == 0; } -static int mesh_customdata_bevel_weight_edge_add_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_customdata_bevel_weight_edge_add_exec(bContext *C, wmOperator * /*op*/) { return mesh_customdata_add_exec__internal(C, BM_EDGE, CD_BWEIGHT); } @@ -973,7 +973,7 @@ static bool mesh_customdata_bevel_weight_edge_clear_poll(bContext *C) return mesh_customdata_bevel_weight_edge_state(C) == 1; } -static int mesh_customdata_bevel_weight_edge_clear_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_customdata_bevel_weight_edge_clear_exec(bContext *C, wmOperator * /*op*/) { return mesh_customdata_clear_exec__internal(C, BM_EDGE, CD_BWEIGHT); } @@ -1011,7 +1011,7 @@ static bool mesh_customdata_crease_edge_add_poll(bContext *C) return mesh_customdata_crease_edge_state(C) == 0; } -static int mesh_customdata_crease_edge_add_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_customdata_crease_edge_add_exec(bContext *C, wmOperator * /*op*/) { return mesh_customdata_add_exec__internal(C, BM_EDGE, CD_CREASE); } @@ -1033,7 +1033,7 @@ static bool mesh_customdata_crease_edge_clear_poll(bContext *C) return mesh_customdata_crease_edge_state(C) == 1; } -static int mesh_customdata_crease_edge_clear_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_customdata_crease_edge_clear_exec(bContext *C, wmOperator * /*op*/) { return mesh_customdata_clear_exec__internal(C, BM_EDGE, CD_CREASE); } @@ -1071,7 +1071,7 @@ static bool mesh_customdata_crease_vertex_add_poll(bContext *C) return mesh_customdata_crease_vertex_state(C) == 0; } -static int mesh_customdata_crease_vertex_add_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_customdata_crease_vertex_add_exec(bContext *C, wmOperator * /*op*/) { return mesh_customdata_add_exec__internal(C, BM_VERT, CD_CREASE); } @@ -1093,7 +1093,7 @@ static bool mesh_customdata_crease_vertex_clear_poll(bContext *C) return (mesh_customdata_crease_vertex_state(C) == 1); } -static int mesh_customdata_crease_vertex_clear_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_customdata_crease_vertex_clear_exec(bContext *C, wmOperator * /*op*/) { return mesh_customdata_clear_exec__internal(C, BM_VERT, CD_CREASE); } diff --git a/source/blender/editors/mesh/meshtools.cc b/source/blender/editors/mesh/meshtools.cc index 917e019c05a..2210cc67bff 100644 --- a/source/blender/editors/mesh/meshtools.cc +++ b/source/blender/editors/mesh/meshtools.cc @@ -877,7 +877,7 @@ void ED_mesh_mirror_topo_table_begin(Object *ob, Mesh *me_eval) ED_mesh_mirrtopo_init(em_mirror, me_mirror, &mesh_topo_store, false); } -void ED_mesh_mirror_topo_table_end(Object *UNUSED(ob)) +void ED_mesh_mirror_topo_table_end(Object * /*ob*/) { /* TODO: store this in object/object-data (keep unused argument for now). */ ED_mesh_mirrtopo_free(&mesh_topo_store); |