Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-10-04 01:37:25 +0300
committerHans Goudey <h.goudey@me.com>2022-10-04 01:38:16 +0300
commit97746129d5870beedc40e3c035c7982ce8a6bebc (patch)
treeb819b8e7875e6684aad7ea1f6bb7922d4fa1c8fc /source/blender/editors
parented7f5713f8f9d605e3cd4cce42e40fb5c6bf4bf5 (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')
-rw-r--r--source/blender/editors/animation/keyframes_keylist.cc4
-rw-r--r--source/blender/editors/asset/intern/asset_ops.cc12
-rw-r--r--source/blender/editors/curves/intern/curves_ops.cc4
-rw-r--r--source/blender/editors/geometry/geometry_attributes.cc10
-rw-r--r--source/blender/editors/gpencil/gpencil_bake_animation.cc6
-rw-r--r--source/blender/editors/gpencil/gpencil_mesh.cc6
-rw-r--r--source/blender/editors/interface/interface.cc12
-rw-r--r--source/blender/editors/interface/interface_anim.cc2
-rw-r--r--source/blender/editors/interface/interface_dropboxes.cc15
-rw-r--r--source/blender/editors/interface/interface_ops.cc38
-rw-r--r--source/blender/editors/interface/interface_panel.cc4
-rw-r--r--source/blender/editors/interface/interface_query.cc6
-rw-r--r--source/blender/editors/interface/interface_region_color_picker.cc12
-rw-r--r--source/blender/editors/interface/interface_region_hud.cc2
-rw-r--r--source/blender/editors/interface/interface_region_menu_pie.cc2
-rw-r--r--source/blender/editors/interface/interface_region_popover.cc2
-rw-r--r--source/blender/editors/interface/interface_region_search.cc8
-rw-r--r--source/blender/editors/interface/interface_region_tooltip.cc2
-rw-r--r--source/blender/editors/interface/interface_template_asset_view.cc14
-rw-r--r--source/blender/editors/interface/interface_template_list.cc20
-rw-r--r--source/blender/editors/interface/interface_template_search_menu.cc8
-rw-r--r--source/blender/editors/interface/interface_template_search_operator.cc6
-rw-r--r--source/blender/editors/interface/view2d_draw.cc4
-rw-r--r--source/blender/editors/interface/view2d_gizmo_navigate.cc4
-rw-r--r--source/blender/editors/interface/view2d_ops.cc10
-rw-r--r--source/blender/editors/interface/views/abstract_view_item.cc2
-rw-r--r--source/blender/editors/mesh/editmesh_select.cc14
-rw-r--r--source/blender/editors/mesh/mesh_data.cc32
-rw-r--r--source/blender/editors/mesh/meshtools.cc2
-rw-r--r--source/blender/editors/object/object_add.cc8
-rw-r--r--source/blender/editors/object/object_modifier.cc54
-rw-r--r--source/blender/editors/object/object_remesh.cc2
-rw-r--r--source/blender/editors/object/object_transform.cc8
-rw-r--r--source/blender/editors/object/object_vgroup.cc38
-rw-r--r--source/blender/editors/render/render_internal.cc2
-rw-r--r--source/blender/editors/render/render_opengl.cc4
-rw-r--r--source/blender/editors/render/render_preview.cc13
-rw-r--r--source/blender/editors/render/render_shading.cc56
-rw-r--r--source/blender/editors/render/render_update.cc6
-rw-r--r--source/blender/editors/render/render_view.cc2
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_add.cc4
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_density.cc8
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_ops.cc8
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.cc4
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_ops_paint.cc14
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.cc33
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc6
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_face_set.cc2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_paint_image.cc4
-rw-r--r--source/blender/editors/space_file/asset_catalog_tree_view.cc2
-rw-r--r--source/blender/editors/space_file/file_indexer.cc14
-rw-r--r--source/blender/editors/space_file/filelist.cc22
-rw-r--r--source/blender/editors/space_image/image_undo.cc8
-rw-r--r--source/blender/editors/space_node/drawnode.cc106
-rw-r--r--source/blender/editors/space_node/node_add.cc6
-rw-r--r--source/blender/editors/space_node/node_draw.cc12
-rw-r--r--source/blender/editors/space_node/node_edit.cc48
-rw-r--r--source/blender/editors/space_node/node_geometry_attribute_search.cc2
-rw-r--r--source/blender/editors/space_node/node_gizmo.cc20
-rw-r--r--source/blender/editors/space_node/node_group.cc4
-rw-r--r--source/blender/editors/space_node/node_relationships.cc20
-rw-r--r--source/blender/editors/space_node/node_select.cc12
-rw-r--r--source/blender/editors/space_node/node_templates.cc2
-rw-r--r--source/blender/editors/space_node/node_view.cc4
-rw-r--r--source/blender/editors/space_node/space_node.cc26
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.cc6
-rw-r--r--source/blender/editors/space_outliner/outliner_dragdrop.cc18
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.cc12
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.cc54
-rw-r--r--source/blender/editors/space_outliner/outliner_select.cc4
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.cc240
-rw-r--r--source/blender/editors/space_outliner/space_outliner.cc12
-rw-r--r--source/blender/editors/space_outliner/tree/tree_element_rna.cc2
-rw-r--r--source/blender/editors/space_spreadsheet/space_spreadsheet.cc22
-rw-r--r--source/blender/editors/space_spreadsheet/spreadsheet_draw.cc16
-rw-r--r--source/blender/editors/space_spreadsheet/spreadsheet_layout.cc2
-rw-r--r--source/blender/editors/space_spreadsheet/spreadsheet_ops.cc6
-rw-r--r--source/blender/editors/space_spreadsheet/spreadsheet_row_filter_ui.cc6
-rw-r--r--source/blender/editors/space_view3d/space_view3d.cc38
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.cc4
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc12
-rw-r--r--source/blender/editors/space_view3d/view3d_select.cc28
-rw-r--r--source/blender/editors/transform/transform_snap_object.cc8
-rw-r--r--source/blender/editors/util/ed_util_ops.cc8
84 files changed, 658 insertions, 687 deletions
diff --git a/source/blender/editors/animation/keyframes_keylist.cc b/source/blender/editors/animation/keyframes_keylist.cc
index da266dd4253..9b3cabb6c79 100644
--- a/source/blender/editors/animation/keyframes_keylist.cc
+++ b/source/blender/editors/animation/keyframes_keylist.cc
@@ -1110,7 +1110,7 @@ void gpencil_to_keylist(bDopeSheet *ads, bGPdata *gpd, AnimKeylist *keylist, con
}
}
-void gpl_to_keylist(bDopeSheet *UNUSED(ads), bGPDlayer *gpl, AnimKeylist *keylist)
+void gpl_to_keylist(bDopeSheet * /*ads*/, bGPDlayer *gpl, AnimKeylist *keylist)
{
if (gpl && keylist) {
ED_keylist_reset_last_accessed(keylist);
@@ -1124,7 +1124,7 @@ void gpl_to_keylist(bDopeSheet *UNUSED(ads), bGPDlayer *gpl, AnimKeylist *keylis
}
}
-void mask_to_keylist(bDopeSheet *UNUSED(ads), MaskLayer *masklay, AnimKeylist *keylist)
+void mask_to_keylist(bDopeSheet * /*ads*/, MaskLayer *masklay, AnimKeylist *keylist)
{
if (masklay && keylist) {
ED_keylist_reset_last_accessed(keylist);
diff --git a/source/blender/editors/asset/intern/asset_ops.cc b/source/blender/editors/asset/intern/asset_ops.cc
index 5aac4f02b03..08259090e0c 100644
--- a/source/blender/editors/asset/intern/asset_ops.cc
+++ b/source/blender/editors/asset/intern/asset_ops.cc
@@ -344,8 +344,8 @@ static bool asset_clear_poll(bContext *C)
return true;
}
-static char *asset_clear_get_description(struct bContext *UNUSED(C),
- struct wmOperatorType *UNUSED(op),
+static char *asset_clear_get_description(struct bContext * /*C*/,
+ struct wmOperatorType * /*op*/,
struct PointerRNA *values)
{
const bool set_fake_user = RNA_boolean_get(values, "set_fake_user");
@@ -397,7 +397,7 @@ static bool asset_library_refresh_poll(bContext *C)
return ED_assetlist_storage_has_list_for_library(library);
}
-static int asset_library_refresh_exec(bContext *C, wmOperator *UNUSED(unused))
+static int asset_library_refresh_exec(bContext *C, wmOperator * /*unused*/)
{
/* Execution mode #1: Inside the Asset Browser. */
if (ED_operator_asset_browsing_active(C)) {
@@ -773,9 +773,9 @@ static int asset_bundle_install_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static const EnumPropertyItem *rna_asset_library_reference_itemf(bContext *UNUSED(C),
- PointerRNA *UNUSED(ptr),
- PropertyRNA *UNUSED(prop),
+static const EnumPropertyItem *rna_asset_library_reference_itemf(bContext * /*C*/,
+ PointerRNA * /*ptr*/,
+ PropertyRNA * /*prop*/,
bool *r_free)
{
const EnumPropertyItem *items = ED_asset_library_reference_to_rna_enum_itemf(false);
diff --git a/source/blender/editors/curves/intern/curves_ops.cc b/source/blender/editors/curves/intern/curves_ops.cc
index 6750b1a6f1a..38b2b2071b8 100644
--- a/source/blender/editors/curves/intern/curves_ops.cc
+++ b/source/blender/editors/curves/intern/curves_ops.cc
@@ -467,7 +467,7 @@ static bke::CurvesGeometry particles_to_curves(Object &object, ParticleSystem &p
return curves;
}
-static int curves_convert_from_particle_system_exec(bContext *C, wmOperator *UNUSED(op))
+static int curves_convert_from_particle_system_exec(bContext *C, wmOperator * /*op*/)
{
Main &bmain = *CTX_data_main(C);
Scene &scene = *CTX_data_scene(C);
@@ -804,7 +804,7 @@ static void CURVES_OT_set_selection_domain(wmOperatorType *ot)
namespace disable_selection {
-static int curves_disable_selection_exec(bContext *C, wmOperator *UNUSED(op))
+static int curves_disable_selection_exec(bContext *C, wmOperator * /*op*/)
{
for (Curves *curves_id : get_unique_editable_curves(*C)) {
curves_id->flag &= ~CV_SCULPT_SELECTION_ENABLED;
diff --git a/source/blender/editors/geometry/geometry_attributes.cc b/source/blender/editors/geometry/geometry_attributes.cc
index 673fb947c57..73b5cab1b25 100644
--- a/source/blender/editors/geometry/geometry_attributes.cc
+++ b/source/blender/editors/geometry/geometry_attributes.cc
@@ -67,8 +67,8 @@ static bool geometry_attributes_remove_poll(bContext *C)
}
static const EnumPropertyItem *geometry_attribute_domain_itemf(bContext *C,
- PointerRNA *UNUSED(ptr),
- PropertyRNA *UNUSED(prop),
+ PointerRNA * /*ptr*/,
+ PropertyRNA * /*prop*/,
bool *r_free)
{
if (C == nullptr) {
@@ -352,7 +352,7 @@ static int geometry_attribute_convert_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static void geometry_color_attribute_add_ui(bContext *UNUSED(C), wmOperator *op)
+static void geometry_color_attribute_add_ui(bContext * /*C*/, wmOperator *op)
{
uiLayout *layout = op->layout;
uiLayoutSetPropSep(layout, true);
@@ -566,7 +566,7 @@ void GEOMETRY_OT_color_attribute_duplicate(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static void geometry_attribute_convert_ui(bContext *UNUSED(C), wmOperator *op)
+static void geometry_attribute_convert_ui(bContext * /*C*/, wmOperator *op)
{
uiLayout *layout = op->layout;
uiLayoutSetPropSep(layout, true);
@@ -585,7 +585,7 @@ static void geometry_attribute_convert_ui(bContext *UNUSED(C), wmOperator *op)
static int geometry_attribute_convert_invoke(bContext *C,
wmOperator *op,
- const wmEvent *UNUSED(event))
+ const wmEvent * /*event*/)
{
return WM_operator_props_dialog_popup(C, op, 300);
}
diff --git a/source/blender/editors/gpencil/gpencil_bake_animation.cc b/source/blender/editors/gpencil/gpencil_bake_animation.cc
index 38621c50ae8..a163d95f46b 100644
--- a/source/blender/editors/gpencil/gpencil_bake_animation.cc
+++ b/source/blender/editors/gpencil/gpencil_bake_animation.cc
@@ -65,8 +65,8 @@ const EnumPropertyItem rna_gpencil_reproject_type_items[] = {
};
/* Check frame_end is always > start frame! */
-static void gpencil_bake_set_frame_end(struct Main *UNUSED(main),
- struct Scene *UNUSED(scene),
+static void gpencil_bake_set_frame_end(struct Main * /*main*/,
+ struct Scene * /*scene*/,
struct PointerRNA *ptr)
{
int frame_start = RNA_int_get(ptr, "frame_start");
@@ -369,7 +369,7 @@ static int gpencil_bake_grease_pencil_animation_exec(bContext *C, wmOperator *op
static int gpencil_bake_grease_pencil_animation_invoke(bContext *C,
wmOperator *op,
- const wmEvent *UNUSED(event))
+ const wmEvent * /*event*/)
{
PropertyRNA *prop;
Scene *scene = CTX_data_scene(C);
diff --git a/source/blender/editors/gpencil/gpencil_mesh.cc b/source/blender/editors/gpencil/gpencil_mesh.cc
index 11d865f814c..50cd74e2b5a 100644
--- a/source/blender/editors/gpencil/gpencil_mesh.cc
+++ b/source/blender/editors/gpencil/gpencil_mesh.cc
@@ -43,8 +43,8 @@
#include "gpencil_intern.h"
/* Check frame_end is always > start frame! */
-static void gpencil_bake_set_frame_end(struct Main *UNUSED(main),
- struct Scene *UNUSED(scene),
+static void gpencil_bake_set_frame_end(struct Main * /*main*/,
+ struct Scene * /*scene*/,
struct PointerRNA *ptr)
{
int frame_start = RNA_int_get(ptr, "frame_start");
@@ -380,7 +380,7 @@ static int gpencil_bake_mesh_animation_exec(bContext *C, wmOperator *op)
static int gpencil_bake_mesh_animation_invoke(bContext *C,
wmOperator *op,
- const wmEvent *UNUSED(event))
+ const wmEvent * /*event*/)
{
/* Show popup dialog to allow editing. */
/* FIXME: hard-coded dimensions here are just arbitrary. */
diff --git a/source/blender/editors/interface/interface.cc b/source/blender/editors/interface/interface.cc
index 42b3198a9c0..ec922ea301b 100644
--- a/source/blender/editors/interface/interface.cc
+++ b/source/blender/editors/interface/interface.cc
@@ -82,9 +82,9 @@ static void ui_but_to_pixelrect(struct rcti *rect,
const struct ARegion *region,
struct uiBlock *block,
const struct uiBut *but);
-static void ui_def_but_rna__menu(bContext *UNUSED(C), uiLayout *layout, void *but_p);
-static void ui_def_but_rna__panel_type(bContext *UNUSED(C), uiLayout *layout, void *but_p);
-static void ui_def_but_rna__menu_type(bContext *UNUSED(C), uiLayout *layout, void *but_p);
+static void ui_def_but_rna__menu(bContext * /*C*/, uiLayout *layout, void *but_p);
+static void ui_def_but_rna__panel_type(bContext * /*C*/, uiLayout *layout, void *but_p);
+static void ui_def_but_rna__menu_type(bContext * /*C*/, uiLayout *layout, void *but_p);
/* avoid unneeded calls to ui_but_value_get */
#define UI_BUT_VALUE_UNSET DBL_MAX
@@ -4263,7 +4263,7 @@ void ui_def_but_icon_clear(uiBut *but)
but->drawflag &= ~UI_BUT_ICON_LEFT;
}
-static void ui_def_but_rna__menu(bContext *UNUSED(C), uiLayout *layout, void *but_p)
+static void ui_def_but_rna__menu(bContext * /*C*/, uiLayout *layout, void *but_p)
{
uiBlock *block = uiLayoutGetBlock(layout);
uiPopupBlockHandle *handle = block->handle;
@@ -6341,7 +6341,7 @@ static void operator_enum_search_update_fn(const struct bContext *C,
void *but,
const char *str,
uiSearchItems *items,
- const bool UNUSED(is_first))
+ const bool /*is_first*/)
{
wmOperatorType *ot = ((uiBut *)but)->optype;
PropertyRNA *prop = ot->prop;
@@ -6390,7 +6390,7 @@ static void operator_enum_search_update_fn(const struct bContext *C,
}
}
-static void operator_enum_search_exec_fn(struct bContext *UNUSED(C), void *but, void *arg2)
+static void operator_enum_search_exec_fn(struct bContext * /*C*/, void *but, void *arg2)
{
wmOperatorType *ot = ((uiBut *)but)->optype;
/* Will create it if needed! */
diff --git a/source/blender/editors/interface/interface_anim.cc b/source/blender/editors/interface/interface_anim.cc
index 4da6cefd8de..58a7ac93242 100644
--- a/source/blender/editors/interface/interface_anim.cc
+++ b/source/blender/editors/interface/interface_anim.cc
@@ -315,7 +315,7 @@ void ui_but_anim_paste_driver(bContext *C)
WM_operator_name_call(C, "ANIM_OT_paste_driver_button", WM_OP_INVOKE_DEFAULT, nullptr, nullptr);
}
-void ui_but_anim_decorate_cb(bContext *C, void *arg_but, void *UNUSED(arg_dummy))
+void ui_but_anim_decorate_cb(bContext *C, void *arg_but, void * /*arg_dummy*/)
{
wmWindowManager *wm = CTX_wm_manager(C);
uiButDecorator *but_decorate = static_cast<uiButDecorator *>(arg_but);
diff --git a/source/blender/editors/interface/interface_dropboxes.cc b/source/blender/editors/interface/interface_dropboxes.cc
index 378162a120e..ebfde05f516 100644
--- a/source/blender/editors/interface/interface_dropboxes.cc
+++ b/source/blender/editors/interface/interface_dropboxes.cc
@@ -41,10 +41,7 @@ static bool ui_view_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
return UI_view_item_can_drop(hovered_item, drag, &drag->drop_state.disabled_info);
}
-static char *ui_view_drop_tooltip(bContext *C,
- wmDrag *drag,
- const int xy[2],
- wmDropBox *UNUSED(drop))
+static char *ui_view_drop_tooltip(bContext *C, wmDrag *drag, const int xy[2], wmDropBox * /*drop*/)
{
const ARegion *region = CTX_wm_region(C);
const uiViewItemHandle *hovered_item = UI_region_views_find_item_at(region, xy);
@@ -61,12 +58,12 @@ static char *ui_view_drop_tooltip(bContext *C,
/** \name Name Drag/Drop Callbacks
* \{ */
-static bool ui_drop_name_poll(struct bContext *C, wmDrag *drag, const wmEvent *UNUSED(event))
+static bool ui_drop_name_poll(struct bContext *C, wmDrag *drag, const wmEvent * /*event*/)
{
return UI_but_active_drop_name(C) && (drag->type == WM_DRAG_ID);
}
-static void ui_drop_name_copy(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
+static void ui_drop_name_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
{
const ID *id = WM_drag_get_local_ID(drag, 0);
RNA_string_set(drop->ptr, "string", id->name + 2);
@@ -78,13 +75,13 @@ static void ui_drop_name_copy(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop
/** \name Material Drag/Drop Callbacks
* \{ */
-static bool ui_drop_material_poll(bContext *C, wmDrag *drag, const wmEvent *UNUSED(event))
+static bool ui_drop_material_poll(bContext *C, wmDrag *drag, const wmEvent * /*event*/)
{
PointerRNA mat_slot = CTX_data_pointer_get_type(C, "material_slot", &RNA_MaterialSlot);
return WM_drag_is_ID_type(drag, ID_MA) && !RNA_pointer_is_null(&mat_slot);
}
-static void ui_drop_material_copy(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
+static void ui_drop_material_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
{
const ID *id = WM_drag_get_local_ID_or_import_from_asset(drag, ID_MA);
RNA_int_set(drop->ptr, "session_uuid", int(id->session_uuid));
@@ -93,7 +90,7 @@ static void ui_drop_material_copy(bContext *UNUSED(C), wmDrag *drag, wmDropBox *
static char *ui_drop_material_tooltip(bContext *C,
wmDrag *drag,
const int UNUSED(xy[2]),
- struct wmDropBox *UNUSED(drop))
+ struct wmDropBox * /*drop*/)
{
PointerRNA rna_ptr = CTX_data_pointer_get_type(C, "object", &RNA_Object);
Object *ob = (Object *)rna_ptr.data;
diff --git a/source/blender/editors/interface/interface_ops.cc b/source/blender/editors/interface/interface_ops.cc
index 603b2c96713..6815f8689f5 100644
--- a/source/blender/editors/interface/interface_ops.cc
+++ b/source/blender/editors/interface/interface_ops.cc
@@ -270,7 +270,7 @@ static bool copy_python_command_button_poll(bContext *C)
return false;
}
-static int copy_python_command_button_exec(bContext *C, wmOperator *UNUSED(op))
+static int copy_python_command_button_exec(bContext *C, wmOperator * /*op*/)
{
uiBut *but = UI_context_active_but_get(C);
@@ -421,7 +421,7 @@ static bool assign_default_button_poll(bContext *C)
return false;
}
-static int assign_default_button_exec(bContext *C, wmOperator *UNUSED(op))
+static int assign_default_button_exec(bContext *C, wmOperator * /*op*/)
{
PointerRNA ptr;
PropertyRNA *prop;
@@ -461,7 +461,7 @@ static void UI_OT_assign_default_button(wmOperatorType *ot)
/** \name Unset Property Button Operator
* \{ */
-static int unset_property_button_exec(bContext *C, wmOperator *UNUSED(op))
+static int unset_property_button_exec(bContext *C, wmOperator * /*op*/)
{
PointerRNA ptr;
PropertyRNA *prop;
@@ -609,9 +609,7 @@ static int override_type_set_button_exec(bContext *C, wmOperator *op)
return operator_button_property_finish(C, &ptr, prop);
}
-static int override_type_set_button_invoke(bContext *C,
- wmOperator *op,
- const wmEvent *UNUSED(event))
+static int override_type_set_button_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
#if 0 /* Disabled for now */
return WM_menu_invoke_ex(C, op, WM_OP_INVOKE_DEFAULT);
@@ -806,7 +804,7 @@ static bool override_idtemplate_make_poll(bContext *C)
return override_idtemplate_poll(C, true);
}
-static int override_idtemplate_make_exec(bContext *C, wmOperator *UNUSED(op))
+static int override_idtemplate_make_exec(bContext *C, wmOperator * /*op*/)
{
ID *owner_id, *id;
PointerRNA owner_ptr;
@@ -869,7 +867,7 @@ static bool override_idtemplate_reset_poll(bContext *C)
return override_idtemplate_poll(C, false);
}
-static int override_idtemplate_reset_exec(bContext *C, wmOperator *UNUSED(op))
+static int override_idtemplate_reset_exec(bContext *C, wmOperator * /*op*/)
{
ID *owner_id, *id;
PointerRNA owner_ptr;
@@ -917,7 +915,7 @@ static bool override_idtemplate_clear_poll(bContext *C)
return override_idtemplate_poll(C, false);
}
-static int override_idtemplate_clear_exec(bContext *C, wmOperator *UNUSED(op))
+static int override_idtemplate_clear_exec(bContext *C, wmOperator * /*op*/)
{
ID *owner_id, *id;
PointerRNA owner_ptr;
@@ -992,7 +990,7 @@ static void UI_OT_override_idtemplate_clear(wmOperatorType *ot)
ot->flag = OPTYPE_UNDO;
}
-static bool override_idtemplate_menu_poll(const bContext *C_const, MenuType *UNUSED(mt))
+static bool override_idtemplate_menu_poll(const bContext *C_const, MenuType * /*mt*/)
{
bContext *C = (bContext *)C_const;
ID *owner_id, *id;
@@ -1008,7 +1006,7 @@ static bool override_idtemplate_menu_poll(const bContext *C_const, MenuType *UNU
return true;
}
-static void override_idtemplate_menu_draw(const bContext *UNUSED(C), Menu *menu)
+static void override_idtemplate_menu_draw(const bContext * /*C*/, Menu *menu)
{
uiLayout *layout = menu->layout;
uiItemO(layout, IFACE_("Make"), ICON_NONE, "UI_OT_override_idtemplate_make");
@@ -1604,7 +1602,7 @@ bool ui_jump_to_target_button_poll(bContext *C)
return jump_to_target_button(C, true);
}
-static int jump_to_target_button_exec(bContext *C, wmOperator *UNUSED(op))
+static int jump_to_target_button_exec(bContext *C, wmOperator * /*op*/)
{
const bool success = jump_to_target_button(C, false);
@@ -2033,7 +2031,7 @@ static void UI_OT_edittranslation_init(wmOperatorType *ot)
/** \name Reload Translation Operator
* \{ */
-static int reloadtranslation_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
+static int reloadtranslation_exec(bContext * /*C*/, wmOperator * /*op*/)
{
BLT_lang_init();
BLF_cache_clear();
@@ -2116,7 +2114,7 @@ static void UI_OT_button_execute(wmOperatorType *ot)
/** \name Text Button Clear Operator
* \{ */
-static int button_string_clear_exec(bContext *C, wmOperator *UNUSED(op))
+static int button_string_clear_exec(bContext *C, wmOperator * /*op*/)
{
uiBut *but = UI_context_active_but_get_respect_menu(C);
@@ -2144,7 +2142,7 @@ static void UI_OT_button_string_clear(wmOperatorType *ot)
/** \name Drop Color Operator
* \{ */
-bool UI_drop_color_poll(struct bContext *C, wmDrag *drag, const wmEvent *UNUSED(event))
+bool UI_drop_color_poll(struct bContext *C, wmDrag *drag, const wmEvent * /*event*/)
{
/* should only return true for regions that include buttons, for now
* return true always */
@@ -2165,7 +2163,7 @@ bool UI_drop_color_poll(struct bContext *C, wmDrag *drag, const wmEvent *UNUSED(
return false;
}
-void UI_drop_color_copy(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
+void UI_drop_color_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
{
uiDragColorHandle *drag_info = static_cast<uiDragColorHandle *>(drag->poin);
@@ -2263,7 +2261,7 @@ static bool drop_name_poll(bContext *C)
return true;
}
-static int drop_name_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int drop_name_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
uiBut *but = UI_but_active_drop_name_button(C);
char *str = RNA_string_get_alloc(op->ptr, "string", nullptr, 0, nullptr);
@@ -2323,7 +2321,7 @@ static bool ui_list_unhide_filter_options(uiList *list)
return true;
}
-static int ui_list_start_filter_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
+static int ui_list_start_filter_invoke(bContext *C, wmOperator * /*op*/, const wmEvent *event)
{
ARegion *region = CTX_wm_region(C);
uiList *list = UI_list_find_mouse_over(region, event);
@@ -2369,7 +2367,7 @@ static bool ui_view_drop_poll(bContext *C)
return hovered_item != nullptr;
}
-static int ui_view_drop_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
+static int ui_view_drop_invoke(bContext *C, wmOperator * /*op*/, const wmEvent *event)
{
if (event->custom != EVT_DATA_DRAGDROP) {
return OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH;
@@ -2419,7 +2417,7 @@ static bool ui_view_item_rename_poll(bContext *C)
return active_item != nullptr && UI_view_item_can_rename(active_item);
}
-static int ui_view_item_rename_exec(bContext *C, wmOperator *UNUSED(op))
+static int ui_view_item_rename_exec(bContext *C, wmOperator * /*op*/)
{
ARegion *region = CTX_wm_region(C);
uiViewItemHandle *active_item = UI_region_views_find_active_item(region);
diff --git a/source/blender/editors/interface/interface_panel.cc b/source/blender/editors/interface/interface_panel.cc
index d25302616e5..7a69e2f9b2f 100644
--- a/source/blender/editors/interface/interface_panel.cc
+++ b/source/blender/editors/interface/interface_panel.cc
@@ -1804,7 +1804,7 @@ static void panels_layout_begin_clear_flags(ListBase *lb)
}
}
-void UI_panels_begin(const bContext *UNUSED(C), ARegion *region)
+void UI_panels_begin(const bContext * /*C*/, ARegion *region)
{
/* Set all panels as inactive, so that at the end we know which ones were used. Also
* clear other flags so we know later that their values were set for the current redraw. */
@@ -1924,7 +1924,7 @@ struct uiPanelDragCollapseHandle {
int xy_init[2];
};
-static void ui_panel_drag_collapse_handler_remove(bContext *UNUSED(C), void *userdata)
+static void ui_panel_drag_collapse_handler_remove(bContext * /*C*/, void *userdata)
{
uiPanelDragCollapseHandle *dragcol_data = static_cast<uiPanelDragCollapseHandle *>(userdata);
MEM_freeN(dragcol_data);
diff --git a/source/blender/editors/interface/interface_query.cc b/source/blender/editors/interface/interface_query.cc
index 8a940ce14ee..480c3e00e6e 100644
--- a/source/blender/editors/interface/interface_query.cc
+++ b/source/blender/editors/interface/interface_query.cc
@@ -424,7 +424,7 @@ uiBut *ui_list_find_from_row(const ARegion *region, const uiBut *row_but)
return ui_but_find(region, ui_but_is_listbox_with_row, row_but);
}
-static bool ui_but_is_listrow(const uiBut *but, const void *UNUSED(customdata))
+static bool ui_but_is_listrow(const uiBut *but, const void * /*customdata*/)
{
return but->type == UI_BTYPE_LISTROW;
}
@@ -456,7 +456,7 @@ uiBut *ui_list_row_find_from_index(const ARegion *region, const int index, uiBut
return ui_but_find(region, ui_but_is_listrow_at_index, &data);
}
-static bool ui_but_is_view_item_fn(const uiBut *but, const void *UNUSED(customdata))
+static bool ui_but_is_view_item_fn(const uiBut *but, const void * /*customdata*/)
{
return but->type == UI_BTYPE_VIEW_ITEM;
}
@@ -466,7 +466,7 @@ uiBut *ui_view_item_find_mouse_over(const ARegion *region, const int xy[2])
return ui_but_find_mouse_over_ex(region, xy, false, false, ui_but_is_view_item_fn, nullptr);
}
-static bool ui_but_is_active_view_item(const uiBut *but, const void *UNUSED(customdata))
+static bool ui_but_is_active_view_item(const uiBut *but, const void * /*customdata*/)
{
if (but->type != UI_BTYPE_VIEW_ITEM) {
return false;
diff --git a/source/blender/editors/interface/interface_region_color_picker.cc b/source/blender/editors/interface/interface_region_color_picker.cc
index b49888005fa..0b2c538331a 100644
--- a/source/blender/editors/interface/interface_region_color_picker.cc
+++ b/source/blender/editors/interface/interface_region_color_picker.cc
@@ -245,7 +245,7 @@ static void ui_update_color_picker_buts_rgb(uiBut *from_but,
}
}
-static void ui_colorpicker_rgba_update_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
+static void ui_colorpicker_rgba_update_cb(bContext * /*C*/, void *bt1, void * /*arg*/)
{
uiBut *but = (uiBut *)bt1;
uiPopupBlockHandle *popup = but->block->handle;
@@ -264,7 +264,7 @@ static void ui_colorpicker_rgba_update_cb(bContext *UNUSED(C), void *bt1, void *
}
}
-static void ui_colorpicker_hsv_update_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
+static void ui_colorpicker_hsv_update_cb(bContext * /*C*/, void *bt1, void * /*arg*/)
{
uiBut *but = (uiBut *)bt1;
uiPopupBlockHandle *popup = but->block->handle;
@@ -279,7 +279,7 @@ static void ui_colorpicker_hsv_update_cb(bContext *UNUSED(C), void *bt1, void *U
}
}
-static void ui_colorpicker_hex_rna_cb(bContext *UNUSED(C), void *bt1, void *hexcl)
+static void ui_colorpicker_hex_rna_cb(bContext * /*C*/, void *bt1, void *hexcl)
{
uiBut *but = (uiBut *)bt1;
uiPopupBlockHandle *popup = but->block->handle;
@@ -302,7 +302,7 @@ static void ui_colorpicker_hex_rna_cb(bContext *UNUSED(C), void *bt1, void *hexc
}
}
-static void ui_popup_close_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
+static void ui_popup_close_cb(bContext * /*C*/, void *bt1, void * /*arg*/)
{
uiBut *but = (uiBut *)bt1;
uiPopupBlockHandle *popup = but->block->handle;
@@ -336,7 +336,7 @@ static void ui_colorpicker_hide_reveal(uiBlock *block, ePickerType colormode)
}
}
-static void ui_colorpicker_create_mode_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
+static void ui_colorpicker_create_mode_cb(bContext * /*C*/, void *bt1, void * /*arg*/)
{
uiBut *bt = static_cast<uiBut *>(bt1);
const short colormode = ui_but_value_get(bt);
@@ -820,7 +820,7 @@ static void ui_block_colorpicker(uiBlock *block,
ui_colorpicker_hide_reveal(block, (ePickerType)colormode);
}
-static int ui_colorpicker_small_wheel_cb(const bContext *UNUSED(C),
+static int ui_colorpicker_small_wheel_cb(const bContext * /*C*/,
uiBlock *block,
const wmEvent *event)
{
diff --git a/source/blender/editors/interface/interface_region_hud.cc b/source/blender/editors/interface/interface_region_hud.cc
index aca36686dea..9c13a776db0 100644
--- a/source/blender/editors/interface/interface_region_hud.cc
+++ b/source/blender/editors/interface/interface_region_hud.cc
@@ -87,7 +87,7 @@ static void hud_region_hide(ARegion *region)
/** \name Redo Panel
* \{ */
-static bool hud_panel_operator_redo_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool hud_panel_operator_redo_poll(const bContext *C, PanelType * /*pt*/)
{
ScrArea *area = CTX_wm_area(C);
ARegion *region = BKE_area_find_region_type(area, RGN_TYPE_HUD);
diff --git a/source/blender/editors/interface/interface_region_menu_pie.cc b/source/blender/editors/interface/interface_region_menu_pie.cc
index becdfaf4e25..9dd6f95e190 100644
--- a/source/blender/editors/interface/interface_region_menu_pie.cc
+++ b/source/blender/editors/interface/interface_region_menu_pie.cc
@@ -49,7 +49,7 @@ struct uiPieMenu {
int mx, my;
};
-static uiBlock *ui_block_func_PIE(bContext *UNUSED(C), uiPopupBlockHandle *handle, void *arg_pie)
+static uiBlock *ui_block_func_PIE(bContext * /*C*/, uiPopupBlockHandle *handle, void *arg_pie)
{
uiBlock *block;
uiPieMenu *pie = static_cast<uiPieMenu *>(arg_pie);
diff --git a/source/blender/editors/interface/interface_region_popover.cc b/source/blender/editors/interface/interface_region_popover.cc
index e3bb4056608..431571c1376 100644
--- a/source/blender/editors/interface/interface_region_popover.cc
+++ b/source/blender/editors/interface/interface_region_popover.cc
@@ -355,7 +355,7 @@ uiPopover *UI_popover_begin(bContext *C, int ui_menu_width, bool from_active_but
return pup;
}
-static void popover_keymap_fn(wmKeyMap *UNUSED(keymap), wmKeyMapItem *UNUSED(kmi), void *user_data)
+static void popover_keymap_fn(wmKeyMap * /*keymap*/, wmKeyMapItem * /*kmi*/, void *user_data)
{
uiPopover *pup = static_cast<uiPopover *>(user_data);
pup->block->handle->menuretval = UI_RETURN_OK;
diff --git a/source/blender/editors/interface/interface_region_search.cc b/source/blender/editors/interface/interface_region_search.cc
index fdef2c15d82..8def878c6af 100644
--- a/source/blender/editors/interface/interface_region_search.cc
+++ b/source/blender/editors/interface/interface_region_search.cc
@@ -307,8 +307,8 @@ bool ui_searchbox_apply(uiBut *but, ARegion *region)
static struct ARegion *wm_searchbox_tooltip_init(struct bContext *C,
struct ARegion *region,
- int *UNUSED(r_pass),
- double *UNUSED(pass_delay),
+ int * /*r_pass*/,
+ double * /*pass_delay*/,
bool *r_exit_on_event)
{
*r_exit_on_event = true;
@@ -903,7 +903,7 @@ static void str_tolower_titlecaps_ascii(char *str, const size_t len)
}
}
-static void ui_searchbox_region_draw_cb__operator(const bContext *UNUSED(C), ARegion *region)
+static void ui_searchbox_region_draw_cb__operator(const bContext * /*C*/, ARegion *region)
{
uiSearchboxData *data = static_cast<uiSearchboxData *>(region->regiondata);
@@ -997,7 +997,7 @@ void ui_searchbox_free(bContext *C, ARegion *region)
ui_region_temp_remove(C, CTX_wm_screen(C), region);
}
-static void ui_searchbox_region_draw_cb__menu(const bContext *UNUSED(C), ARegion *UNUSED(region))
+static void ui_searchbox_region_draw_cb__menu(const bContext * /*C*/, ARegion * /*region*/)
{
/* Currently unused. */
}
diff --git a/source/blender/editors/interface/interface_region_tooltip.cc b/source/blender/editors/interface/interface_region_tooltip.cc
index 3ded613c6f3..2a06267d90b 100644
--- a/source/blender/editors/interface/interface_region_tooltip.cc
+++ b/source/blender/editors/interface/interface_region_tooltip.cc
@@ -157,7 +157,7 @@ static void rgb_tint(float col[3], float h, float h_strength, float v, float v_s
hsv_to_rgb_v(col_hsv_to, col);
}
-static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *region)
+static void ui_tooltip_region_draw_cb(const bContext * /*C*/, ARegion *region)
{
const float pad_px = UI_TIP_PADDING;
uiTooltipData *data = static_cast<uiTooltipData *>(region->regiondata);
diff --git a/source/blender/editors/interface/interface_template_asset_view.cc b/source/blender/editors/interface/interface_template_asset_view.cc
index 3147deb5ad1..11fe653724c 100644
--- a/source/blender/editors/interface/interface_template_asset_view.cc
+++ b/source/blender/editors/interface/interface_template_asset_view.cc
@@ -66,15 +66,15 @@ static void asset_view_item_but_drag_set(uiBut *but,
}
static void asset_view_draw_item(uiList *ui_list,
- const bContext *UNUSED(C),
+ const bContext * /*C*/,
uiLayout *layout,
- PointerRNA *UNUSED(dataptr),
+ PointerRNA * /*dataptr*/,
PointerRNA *itemptr,
- int UNUSED(icon),
- PointerRNA *UNUSED(active_dataptr),
- const char *UNUSED(active_propname),
- int UNUSED(index),
- int UNUSED(flt_flag))
+ int /*icon*/,
+ PointerRNA * /*active_dataptr*/,
+ const char * /*active_propname*/,
+ int /*index*/,
+ int /*flt_flag*/)
{
AssetViewListData *list_data = (AssetViewListData *)ui_list->dyn_data->customdata;
diff --git a/source/blender/editors/interface/interface_template_list.cc b/source/blender/editors/interface/interface_template_list.cc
index f09eb5f3eb0..2b581f187a6 100644
--- a/source/blender/editors/interface/interface_template_list.cc
+++ b/source/blender/editors/interface/interface_template_list.cc
@@ -83,15 +83,15 @@ struct TemplateListVisualInfo {
};
static void uilist_draw_item_default(struct uiList *ui_list,
- const struct bContext *UNUSED(C),
+ const struct bContext * /*C*/,
struct uiLayout *layout,
- struct PointerRNA *UNUSED(dataptr),
+ struct PointerRNA * /*dataptr*/,
struct PointerRNA *itemptr,
int icon,
- struct PointerRNA *UNUSED(active_dataptr),
- const char *UNUSED(active_propname),
- int UNUSED(index),
- int UNUSED(flt_flag))
+ struct PointerRNA * /*active_dataptr*/,
+ const char * /*active_propname*/,
+ int /*index*/,
+ int /*flt_flag*/)
{
PropertyRNA *nameprop = RNA_struct_name_property(itemptr->type);
@@ -114,7 +114,7 @@ static void uilist_draw_item_default(struct uiList *ui_list,
}
static void uilist_draw_filter_default(struct uiList *ui_list,
- const struct bContext *UNUSED(C),
+ const struct bContext * /*C*/,
struct uiLayout *layout)
{
PointerRNA listptr;
@@ -160,7 +160,7 @@ static int cmpstringp(const void *p1, const void *p2)
}
static void uilist_filter_items_default(struct uiList *ui_list,
- const struct bContext *UNUSED(C),
+ const struct bContext * /*C*/,
struct PointerRNA *dataptr,
const char *propname)
{
@@ -561,7 +561,7 @@ static void uilist_prepare(uiList *ui_list,
items->tot_items);
}
-static void uilist_resize_update_cb(bContext *C, void *arg1, void *UNUSED(arg2))
+static void uilist_resize_update_cb(bContext *C, void *arg1, void * /*arg2*/)
{
uiList *ui_list = static_cast<uiList *>(arg1);
uiListDyn *dyn_data = ui_list->dyn_data;
@@ -592,7 +592,7 @@ static void *uilist_item_use_dynamic_tooltip(PointerRNA *itemptr, const char *pr
return nullptr;
}
-static char *uilist_item_tooltip_func(bContext *UNUSED(C), void *argN, const char *tip)
+static char *uilist_item_tooltip_func(bContext * /*C*/, void *argN, const char *tip)
{
char *dyn_tooltip = static_cast<char *>(argN);
return BLI_sprintfN("%s - %s", tip, dyn_tooltip);
diff --git a/source/blender/editors/interface/interface_template_search_menu.cc b/source/blender/editors/interface/interface_template_search_menu.cc
index f61baf65b58..515a69c19c9 100644
--- a/source/blender/editors/interface/interface_template_search_menu.cc
+++ b/source/blender/editors/interface/interface_template_search_menu.cc
@@ -931,7 +931,7 @@ static void menu_search_arg_free_fn(void *data_v)
MEM_freeN(data);
}
-static void menu_search_exec_fn(bContext *C, void *UNUSED(arg1), void *arg2)
+static void menu_search_exec_fn(bContext *C, void * /*arg1*/, void *arg2)
{
MenuSearch_Item *item = (MenuSearch_Item *)arg2;
if (item == nullptr) {
@@ -994,11 +994,11 @@ static void menu_search_exec_fn(bContext *C, void *UNUSED(arg1), void *arg2)
}
}
-static void menu_search_update_fn(const bContext *UNUSED(C),
+static void menu_search_update_fn(const bContext * /*C*/,
void *arg,
const char *str,
uiSearchItems *items,
- const bool UNUSED(is_first))
+ const bool /*is_first*/)
{
MenuSearch_Data *data = (MenuSearch_Data *)arg;
@@ -1077,7 +1077,7 @@ static bool ui_search_menu_create_context_menu(struct bContext *C,
static struct ARegion *ui_search_menu_create_tooltip(struct bContext *C,
struct ARegion *region,
- const rcti *UNUSED(item_rect),
+ const rcti * /*item_rect*/,
void *arg,
void *active)
{
diff --git a/source/blender/editors/interface/interface_template_search_operator.cc b/source/blender/editors/interface/interface_template_search_operator.cc
index 0d0a5f01744..58f44de5278 100644
--- a/source/blender/editors/interface/interface_template_search_operator.cc
+++ b/source/blender/editors/interface/interface_template_search_operator.cc
@@ -34,7 +34,7 @@
/** \name Operator Search Template Implementation
* \{ */
-static void operator_search_exec_fn(bContext *C, void *UNUSED(arg1), void *arg2)
+static void operator_search_exec_fn(bContext *C, void * /*arg1*/, void *arg2)
{
wmOperatorType *ot = static_cast<wmOperatorType *>(arg2);
@@ -44,10 +44,10 @@ static void operator_search_exec_fn(bContext *C, void *UNUSED(arg1), void *arg2)
}
static void operator_search_update_fn(const bContext *C,
- void *UNUSED(arg),
+ void * /*arg*/,
const char *str,
uiSearchItems *items,
- const bool UNUSED(is_first))
+ const bool /*is_first*/)
{
GHashIterator iter;
diff --git a/source/blender/editors/interface/view2d_draw.cc b/source/blender/editors/interface/view2d_draw.cc
index ca96c2abb9d..a8d6d6c78de 100644
--- a/source/blender/editors/interface/view2d_draw.cc
+++ b/source/blender/editors/interface/view2d_draw.cc
@@ -408,7 +408,7 @@ static void draw_vertical_scale_indicators(const ARegion *region,
}
static void view_to_string__frame_number(
- void *UNUSED(user_data), float v2d_pos, float UNUSED(v2d_step), uint max_len, char *r_str)
+ void * /*user_data*/, float v2d_pos, float /*v2d_step*/, uint max_len, char *r_str)
{
BLI_snprintf(r_str, max_len, "%d", int(v2d_pos));
}
@@ -428,7 +428,7 @@ static void view_to_string__time(
}
static void view_to_string__value(
- void *UNUSED(user_data), float v2d_pos, float v2d_step, uint max_len, char *r_str)
+ void * /*user_data*/, float v2d_pos, float v2d_step, uint max_len, char *r_str)
{
if (v2d_step >= 1.0f) {
BLI_snprintf(r_str, max_len, "%d", int(v2d_pos));
diff --git a/source/blender/editors/interface/view2d_gizmo_navigate.cc b/source/blender/editors/interface/view2d_gizmo_navigate.cc
index fae28833e4f..78549a33fc5 100644
--- a/source/blender/editors/interface/view2d_gizmo_navigate.cc
+++ b/source/blender/editors/interface/view2d_gizmo_navigate.cc
@@ -113,7 +113,7 @@ struct NavigateWidgetGroup {
int region_size[2];
};
-static bool WIDGETGROUP_navigate_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
+static bool WIDGETGROUP_navigate_poll(const bContext *C, wmGizmoGroupType * /*gzgt*/)
{
if ((U.uiflag & USER_SHOW_GIZMO_NAVIGATE) == 0) {
return false;
@@ -141,7 +141,7 @@ static bool WIDGETGROUP_navigate_poll(const bContext *C, wmGizmoGroupType *UNUSE
return true;
}
-static void WIDGETGROUP_navigate_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
+static void WIDGETGROUP_navigate_setup(const bContext * /*C*/, wmGizmoGroup *gzgroup)
{
NavigateWidgetGroup *navgroup = MEM_cnew<NavigateWidgetGroup>(__func__);
diff --git a/source/blender/editors/interface/view2d_ops.cc b/source/blender/editors/interface/view2d_ops.cc
index c72a0c75ee4..9b2c17bd73e 100644
--- a/source/blender/editors/interface/view2d_ops.cc
+++ b/source/blender/editors/interface/view2d_ops.cc
@@ -293,7 +293,7 @@ static int view_pan_modal(bContext *C, wmOperator *op, const wmEvent *event)
return OPERATOR_RUNNING_MODAL;
}
-static void view_pan_cancel(bContext *UNUSED(C), wmOperator *op)
+static void view_pan_cancel(bContext * /*C*/, wmOperator *op)
{
view_pan_exit(op);
}
@@ -330,7 +330,7 @@ static void VIEW2D_OT_pan(wmOperatorType *ot)
* \{ */
/* set up modal operator and relevant settings */
-static int view_edge_pan_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int view_edge_pan_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
op->customdata = MEM_callocN(sizeof(View2DEdgePanData), "View2DEdgePanData");
View2DEdgePanData *vpd = static_cast<View2DEdgePanData *>(op->customdata);
@@ -358,7 +358,7 @@ static int view_edge_pan_modal(bContext *C, wmOperator *op, const wmEvent *event
return OPERATOR_PASS_THROUGH;
}
-static void view_edge_pan_cancel(bContext *UNUSED(C), wmOperator *op)
+static void view_edge_pan_cancel(bContext * /*C*/, wmOperator *op)
{
v2dViewPanData *vpd = static_cast<v2dViewPanData *>(op->customdata);
vpd->v2d->flag &= ~V2D_IS_NAVIGATING;
@@ -1614,7 +1614,7 @@ void UI_view2d_smooth_view(const bContext *C,
}
/* only meant for timer usage */
-static int view2d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
+static int view2d_smoothview_invoke(bContext *C, wmOperator * /*op*/, const wmEvent *event)
{
wmWindow *win = CTX_wm_window(C);
ARegion *region = CTX_wm_region(C);
@@ -2169,7 +2169,7 @@ static void VIEW2D_OT_scroller_activate(wmOperatorType *ot)
/** \name View Reset Operator
* \{ */
-static int reset_exec(bContext *C, wmOperator *UNUSED(op))
+static int reset_exec(bContext *C, wmOperator * /*op*/)
{
const uiStyle *style = UI_style_get();
ARegion *region = CTX_wm_region(C);
diff --git a/source/blender/editors/interface/views/abstract_view_item.cc b/source/blender/editors/interface/views/abstract_view_item.cc
index f73183d07e9..101cb66bfa9 100644
--- a/source/blender/editors/interface/views/abstract_view_item.cc
+++ b/source/blender/editors/interface/views/abstract_view_item.cc
@@ -112,7 +112,7 @@ static AbstractViewItem *find_item_from_rename_button(const uiBut &rename_but)
return nullptr;
}
-static void rename_button_fn(bContext *UNUSED(C), void *arg, char *UNUSED(origstr))
+static void rename_button_fn(bContext * /*C*/, void *arg, char * /*origstr*/)
{
const uiBut *rename_but = static_cast<uiBut *>(arg);
AbstractViewItem *item = find_item_from_rename_button(*rename_but);
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);
diff --git a/source/blender/editors/object/object_add.cc b/source/blender/editors/object/object_add.cc
index a24b6ed4830..3ce39b695e0 100644
--- a/source/blender/editors/object/object_add.cc
+++ b/source/blender/editors/object/object_add.cc
@@ -372,8 +372,8 @@ float ED_object_new_primitive_matrix(bContext *C,
/** \name Add Object Operator
* \{ */
-static void view_align_update(struct Main *UNUSED(main),
- struct Scene *UNUSED(scene),
+static void view_align_update(struct Main * /*main*/,
+ struct Scene * /*scene*/,
struct PointerRNA *ptr)
{
RNA_struct_idprops_unset(ptr, "rotation");
@@ -1475,7 +1475,7 @@ static int object_gpencil_add_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static void object_add_ui(bContext *UNUSED(C), wmOperator *op)
+static void object_add_ui(bContext * /*C*/, wmOperator *op)
{
uiLayout *layout = op->layout;
@@ -3467,7 +3467,7 @@ static int object_convert_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static void object_convert_ui(bContext *UNUSED(C), wmOperator *op)
+static void object_convert_ui(bContext * /*C*/, wmOperator *op)
{
uiLayout *layout = op->layout;
diff --git a/source/blender/editors/object/object_modifier.cc b/source/blender/editors/object/object_modifier.cc
index 424bf3c73e2..0fc97f96dbf 100644
--- a/source/blender/editors/object/object_modifier.cc
+++ b/source/blender/editors/object/object_modifier.cc
@@ -522,7 +522,7 @@ void ED_object_modifier_copy_to_object(bContext *C,
DEG_relations_tag_update(bmain);
}
-bool ED_object_modifier_convert_psys_to_mesh(ReportList *UNUSED(reports),
+bool ED_object_modifier_convert_psys_to_mesh(ReportList * /*reports*/,
Main *bmain,
Depsgraph *depsgraph,
Scene *scene,
@@ -941,7 +941,7 @@ bool ED_object_modifier_apply(Main *bmain,
}
bool ED_object_modifier_copy(
- ReportList *UNUSED(reports), Main *bmain, Scene *scene, Object *ob, ModifierData *md)
+ ReportList * /*reports*/, Main *bmain, Scene *scene, Object *ob, ModifierData *md)
{
if (md->type == eModifierType_ParticleSystem) {
ModifierData *nmd = object_copy_particle_system(
@@ -986,8 +986,8 @@ static int modifier_add_exec(bContext *C, wmOperator *op)
}
static const EnumPropertyItem *modifier_add_itemf(bContext *C,
- PointerRNA *UNUSED(ptr),
- PropertyRNA *UNUSED(prop),
+ PointerRNA * /*ptr*/,
+ PropertyRNA * /*prop*/,
bool *r_free)
{
Object *ob = ED_object_active_context(C);
@@ -1588,8 +1588,8 @@ static int modifier_apply_as_shapekey_invoke(bContext *C, wmOperator *op, const
return retval;
}
-static char *modifier_apply_as_shapekey_get_description(struct bContext *UNUSED(C),
- struct wmOperatorType *UNUSED(op),
+static char *modifier_apply_as_shapekey_get_description(struct bContext * /*C*/,
+ struct wmOperatorType * /*op*/,
struct PointerRNA *values)
{
bool keep = RNA_boolean_get(values, "keep_modifier");
@@ -1647,7 +1647,7 @@ static int modifier_convert_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int modifier_convert_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int modifier_convert_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
if (edit_modifier_invoke_properties(C, op)) {
return modifier_convert_exec(C, op);
@@ -1940,7 +1940,7 @@ static int multires_higher_levels_delete_exec(bContext *C, wmOperator *op)
static int multires_higher_levels_delete_invoke(bContext *C,
wmOperator *op,
- const wmEvent *UNUSED(event))
+ const wmEvent * /*event*/)
{
if (edit_modifier_invoke_properties(C, op)) {
return multires_higher_levels_delete_exec(C, op);
@@ -2016,7 +2016,7 @@ static int multires_subdivide_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int multires_subdivide_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int multires_subdivide_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
if (edit_modifier_invoke_properties(C, op)) {
return multires_subdivide_exec(C, op);
@@ -2091,7 +2091,7 @@ static int multires_reshape_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int multires_reshape_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int multires_reshape_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
if (edit_modifier_invoke_properties(C, op)) {
return multires_reshape_exec(C, op);
@@ -2148,7 +2148,7 @@ static int multires_external_save_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int multires_external_save_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int multires_external_save_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
Object *ob = ED_object_active_context(C);
Mesh *me = static_cast<Mesh *>(ob->data);
@@ -2213,7 +2213,7 @@ void OBJECT_OT_multires_external_save(wmOperatorType *ot)
/** \name Multires Pack Operator
* \{ */
-static int multires_external_pack_exec(bContext *C, wmOperator *UNUSED(op))
+static int multires_external_pack_exec(bContext *C, wmOperator * /*op*/)
{
Object *ob = ED_object_active_context(C);
Mesh *me = static_cast<Mesh *>(ob->data);
@@ -2270,7 +2270,7 @@ static int multires_base_apply_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int multires_base_apply_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int multires_base_apply_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
if (edit_modifier_invoke_properties(C, op)) {
return multires_base_apply_exec(C, op);
@@ -2322,7 +2322,7 @@ static int multires_unsubdivide_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int multires_unsubdivide_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int multires_unsubdivide_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
if (edit_modifier_invoke_properties(C, op)) {
return multires_unsubdivide_exec(C, op);
@@ -2376,9 +2376,7 @@ static int multires_rebuild_subdiv_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int multires_rebuild_subdiv_invoke(bContext *C,
- wmOperator *op,
- const wmEvent *UNUSED(event))
+static int multires_rebuild_subdiv_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
if (edit_modifier_invoke_properties(C, op)) {
return multires_rebuild_subdiv_exec(C, op);
@@ -2453,7 +2451,7 @@ static void skin_root_clear(BMVert *bm_vert, GSet *visited, const int cd_vert_sk
}
}
-static int skin_root_mark_exec(bContext *C, wmOperator *UNUSED(op))
+static int skin_root_mark_exec(bContext *C, wmOperator * /*op*/)
{
Object *ob = CTX_data_edit_object(C);
BMEditMesh *em = BKE_editmesh_from_object(ob);
@@ -2562,7 +2560,7 @@ void OBJECT_OT_skin_loose_mark_clear(wmOperatorType *ot)
RNA_def_enum(ot->srna, "action", action_items, SKIN_LOOSE_MARK, "Action", nullptr);
}
-static int skin_radii_equalize_exec(bContext *C, wmOperator *UNUSED(op))
+static int skin_radii_equalize_exec(bContext *C, wmOperator * /*op*/)
{
Object *ob = CTX_data_edit_object(C);
BMEditMesh *em = BKE_editmesh_from_object(ob);
@@ -2750,7 +2748,7 @@ static int skin_armature_create_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int skin_armature_create_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int skin_armature_create_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
if (edit_modifier_invoke_properties(C, op)) {
return skin_armature_create_exec(C, op);
@@ -2827,7 +2825,7 @@ static int correctivesmooth_bind_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int correctivesmooth_bind_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int correctivesmooth_bind_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
if (edit_modifier_invoke_properties(C, op)) {
return correctivesmooth_bind_exec(C, op);
@@ -2902,7 +2900,7 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int meshdeform_bind_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int meshdeform_bind_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
if (edit_modifier_invoke_properties(C, op)) {
return meshdeform_bind_exec(C, op);
@@ -2956,7 +2954,7 @@ static int explode_refresh_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int explode_refresh_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int explode_refresh_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
if (edit_modifier_invoke_properties(C, op)) {
return explode_refresh_exec(C, op);
@@ -3008,7 +3006,7 @@ static void oceanbake_free(void *customdata)
}
/* called by oceanbake, only to check job 'stop' value */
-static int oceanbake_breakjob(void *UNUSED(customdata))
+static int oceanbake_breakjob(void * /*customdata*/)
{
// OceanBakeJob *ob = (OceanBakeJob *)customdata;
// return *(ob->stop);
@@ -3157,7 +3155,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int ocean_bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int ocean_bake_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
if (edit_modifier_invoke_properties(C, op)) {
return ocean_bake_exec(C, op);
@@ -3234,7 +3232,7 @@ static int laplaciandeform_bind_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int laplaciandeform_bind_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int laplaciandeform_bind_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
if (edit_modifier_invoke_properties(C, op)) {
return laplaciandeform_bind_exec(C, op);
@@ -3301,7 +3299,7 @@ static int surfacedeform_bind_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int surfacedeform_bind_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int surfacedeform_bind_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
if (edit_modifier_invoke_properties(C, op)) {
return surfacedeform_bind_exec(C, op);
@@ -3384,7 +3382,7 @@ void OBJECT_OT_geometry_nodes_input_attribute_toggle(wmOperatorType *ot)
/** \name Copy and Assign Geometry Node Group operator
* \{ */
-static int geometry_node_tree_copy_assign_exec(bContext *C, wmOperator *UNUSED(op))
+static int geometry_node_tree_copy_assign_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
Object *ob = ED_object_active_context(C);
diff --git a/source/blender/editors/object/object_remesh.cc b/source/blender/editors/object/object_remesh.cc
index 9f59549d3db..8358bf632d3 100644
--- a/source/blender/editors/object/object_remesh.cc
+++ b/source/blender/editors/object/object_remesh.cc
@@ -286,7 +286,7 @@ static void voxel_size_parallel_lines_draw(uint pos3d,
immEnd();
}
-static void voxel_size_edit_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
+static void voxel_size_edit_draw(const bContext *C, ARegion * /*ar*/, void *arg)
{
VoxelSizeEditCustomData *cd = static_cast<VoxelSizeEditCustomData *>(arg);
diff --git a/source/blender/editors/object/object_transform.cc b/source/blender/editors/object/object_transform.cc
index 8ba460b1c6d..6604e3da4d2 100644
--- a/source/blender/editors/object/object_transform.cc
+++ b/source/blender/editors/object/object_transform.cc
@@ -469,7 +469,7 @@ void OBJECT_OT_scale_clear(wmOperatorType *ot)
/** \name Clear Origin Operator
* \{ */
-static int object_origin_clear_exec(bContext *C, wmOperator *UNUSED(op))
+static int object_origin_clear_exec(bContext *C, wmOperator * /*op*/)
{
float *v1, *v3;
float mat[3][3];
@@ -1066,7 +1066,7 @@ static int apply_objects_internal(bContext *C,
return OPERATOR_FINISHED;
}
-static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
+static int visual_transform_apply_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
@@ -1123,7 +1123,7 @@ static int object_transform_apply_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int object_transform_apply_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int object_transform_apply_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
Object *ob = ED_object_active_context(C);
@@ -1181,7 +1181,7 @@ void OBJECT_OT_transform_apply(wmOperatorType *ot)
/** \name Apply Parent Inverse Operator
* \{ */
-static int object_parent_inverse_apply_exec(bContext *C, wmOperator *UNUSED(op))
+static int object_parent_inverse_apply_exec(bContext *C, wmOperator * /*op*/)
{
CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) {
if (ob->parent == nullptr) {
diff --git a/source/blender/editors/object/object_vgroup.cc b/source/blender/editors/object/object_vgroup.cc
index 0e671257972..02a247dd15e 100644
--- a/source/blender/editors/object/object_vgroup.cc
+++ b/source/blender/editors/object/object_vgroup.cc
@@ -715,7 +715,7 @@ static const EnumPropertyItem WT_vertex_group_select_item[] = {
};
const EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(const bContext *C,
- PointerRNA *UNUSED(ptr),
+ PointerRNA * /*ptr*/,
PropertyRNA *prop,
bool *r_free,
const uint selection_mask)
@@ -1340,7 +1340,7 @@ static void getVerticalAndHorizontalChange(const float norm[3],
* `coord` is a point on the plane.
*/
static void moveCloserToDistanceFromPlane(Depsgraph *depsgraph,
- Scene *UNUSED(scene),
+ Scene * /*scene*/,
Object *ob,
Mesh *me,
int index,
@@ -1522,7 +1522,7 @@ static void moveCloserToDistanceFromPlane(Depsgraph *depsgraph,
/* this is used to try to smooth a surface by only adjusting the nonzero weights of a vertex
* but it could be used to raise or lower an existing 'bump.' */
static void vgroup_fix(
- const bContext *C, Scene *UNUSED(scene), Object *ob, float distToBe, float strength, float cp)
+ const bContext *C, Scene * /*scene*/, Object *ob, float distToBe, float strength, float cp)
{
using namespace blender;
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
@@ -1580,7 +1580,7 @@ static void vgroup_fix(
static void vgroup_levels_subset(Object *ob,
const bool *vgroup_validmap,
const int vgroup_tot,
- const int UNUSED(subset_count),
+ const int /*subset_count*/,
const float offset,
const float gain)
{
@@ -1841,7 +1841,7 @@ static void vgroup_lock_all(Object *ob, int action, int mask)
static void vgroup_invert_subset(Object *ob,
const bool *vgroup_validmap,
const int vgroup_tot,
- const int UNUSED(subset_count),
+ const int /*subset_count*/,
const bool auto_assign,
const bool auto_remove)
{
@@ -2227,7 +2227,7 @@ static int vgroup_limit_total_subset(Object *ob,
static void vgroup_clean_subset(Object *ob,
const bool *vgroup_validmap,
const int vgroup_tot,
- const int UNUSED(subset_count),
+ const int /*subset_count*/,
const float epsilon,
const bool keep_single)
{
@@ -2258,7 +2258,7 @@ static void vgroup_clean_subset(Object *ob,
static void vgroup_quantize_subset(Object *ob,
const bool *vgroup_validmap,
const int vgroup_tot,
- const int UNUSED(subset_count),
+ const int /*subset_count*/,
const int steps)
{
MDeformVert **dvert_array = nullptr;
@@ -2879,7 +2879,7 @@ static bool vertex_group_vert_select_mesh_poll(bContext *C)
/** \name Vertex Group Add Operator
* \{ */
-static int vertex_group_add_exec(bContext *C, wmOperator *UNUSED(op))
+static int vertex_group_add_exec(bContext *C, wmOperator * /*op*/)
{
Object *ob = ED_object_context(C);
@@ -2966,7 +2966,7 @@ void OBJECT_OT_vertex_group_remove(wmOperatorType *ot)
/** \name Vertex Group Assign Operator
* \{ */
-static int vertex_group_assign_exec(bContext *C, wmOperator *UNUSED(op))
+static int vertex_group_assign_exec(bContext *C, wmOperator * /*op*/)
{
ToolSettings *ts = CTX_data_tool_settings(C);
Object *ob = ED_object_context(C);
@@ -3097,7 +3097,7 @@ void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot)
/** \name Vertex Group Select Operator
* \{ */
-static int vertex_group_select_exec(bContext *C, wmOperator *UNUSED(op))
+static int vertex_group_select_exec(bContext *C, wmOperator * /*op*/)
{
Object *ob = ED_object_context(C);
@@ -3133,7 +3133,7 @@ void OBJECT_OT_vertex_group_select(wmOperatorType *ot)
/** \name Vertex Group Deselect Operator
* \{ */
-static int vertex_group_deselect_exec(bContext *C, wmOperator *UNUSED(op))
+static int vertex_group_deselect_exec(bContext *C, wmOperator * /*op*/)
{
Object *ob = ED_object_context(C);
@@ -3165,7 +3165,7 @@ void OBJECT_OT_vertex_group_deselect(wmOperatorType *ot)
/** \name Vertex Group Copy Operator
* \{ */
-static int vertex_group_copy_exec(bContext *C, wmOperator *UNUSED(op))
+static int vertex_group_copy_exec(bContext *C, wmOperator * /*op*/)
{
Object *ob = ED_object_context(C);
@@ -3250,7 +3250,7 @@ void OBJECT_OT_vertex_group_levels(wmOperatorType *ot)
/** \name Vertex Group Normalize Operator
* \{ */
-static int vertex_group_normalize_exec(bContext *C, wmOperator *UNUSED(op))
+static int vertex_group_normalize_exec(bContext *C, wmOperator * /*op*/)
{
Object *ob = ED_object_context(C);
bool changed;
@@ -3443,8 +3443,8 @@ static int vertex_group_lock_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static char *vertex_group_lock_description(bContext *UNUSED(C),
- wmOperatorType *UNUSED(op),
+static char *vertex_group_lock_description(bContext * /*C*/,
+ wmOperatorType * /*op*/,
PointerRNA *params)
{
int action = RNA_enum_get(params, "action");
@@ -3967,8 +3967,8 @@ static int set_active_group_exec(bContext *C, wmOperator *op)
}
static const EnumPropertyItem *vgroup_itemf(bContext *C,
- PointerRNA *UNUSED(ptr),
- PropertyRNA *UNUSED(prop),
+ PointerRNA * /*ptr*/,
+ PropertyRNA * /*prop*/,
bool *r_free)
{
if (C == nullptr) {
@@ -4558,7 +4558,7 @@ void OBJECT_OT_vertex_weight_set_active(wmOperatorType *ot)
/** \name Vertex Group Normalize Active Vertex Operator
* \{ */
-static int vertex_weight_normalize_active_vertex_exec(bContext *C, wmOperator *UNUSED(op))
+static int vertex_weight_normalize_active_vertex_exec(bContext *C, wmOperator * /*op*/)
{
Object *ob = ED_object_context(C);
ToolSettings *ts = CTX_data_tool_settings(C);
@@ -4597,7 +4597,7 @@ void OBJECT_OT_vertex_weight_normalize_active_vertex(wmOperatorType *ot)
/** \name Vertex Group Copy Weights from Active Operator
* \{ */
-static int vertex_weight_copy_exec(bContext *C, wmOperator *UNUSED(op))
+static int vertex_weight_copy_exec(bContext *C, wmOperator * /*op*/)
{
Object *ob = ED_object_context(C);
ToolSettings *ts = CTX_data_tool_settings(C);
diff --git a/source/blender/editors/render/render_internal.cc b/source/blender/editors/render/render_internal.cc
index 7f6a14126e0..e66cabbc9f8 100644
--- a/source/blender/editors/render/render_internal.cc
+++ b/source/blender/editors/render/render_internal.cc
@@ -808,7 +808,7 @@ static int render_breakjob(void *rjv)
* For exec() when there is no render job
* NOTE: this won't check for the escape key being pressed, but doing so isn't thread-safe.
*/
-static int render_break(void *UNUSED(rjv))
+static int render_break(void * /*rjv*/)
{
if (G.is_break) {
return 1;
diff --git a/source/blender/editors/render/render_opengl.cc b/source/blender/editors/render/render_opengl.cc
index e91bffce2c2..d5e3d1171cd 100644
--- a/source/blender/editors/render/render_opengl.cc
+++ b/source/blender/editors/render/render_opengl.cc
@@ -1310,8 +1310,8 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static char *screen_opengl_render_description(struct bContext *UNUSED(C),
- struct wmOperatorType *UNUSED(ot),
+static char *screen_opengl_render_description(struct bContext * /*C*/,
+ struct wmOperatorType * /*ot*/,
struct PointerRNA *ptr)
{
if (!RNA_boolean_get(ptr, "animation")) {
diff --git a/source/blender/editors/render/render_preview.cc b/source/blender/editors/render/render_preview.cc
index 2e844aa5185..ad24f46f923 100644
--- a/source/blender/editors/render/render_preview.cc
+++ b/source/blender/editors/render/render_preview.cc
@@ -1039,7 +1039,7 @@ static void action_preview_render(IconPreview *preview, IconPreviewSize *preview
* \{ */
/* inside thread, called by renderer, sets job update value */
-static void shader_preview_update(void *spv, RenderResult *UNUSED(rr), struct rcti *UNUSED(rect))
+static void shader_preview_update(void *spv, RenderResult * /*rr*/, struct rcti * /*rect*/)
{
ShaderPreview *sp = static_cast<ShaderPreview *>(spv);
@@ -1054,7 +1054,7 @@ static int shader_preview_break(void *spv)
return *(sp->stop);
}
-static void shader_preview_updatejob(void *UNUSED(spv))
+static void shader_preview_updatejob(void * /*spv*/)
{
}
@@ -1490,7 +1490,7 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat
static void common_preview_startjob(void *customdata,
short *stop,
short *do_update,
- float *UNUSED(progress))
+ float * /*progress*/)
{
ShaderPreview *sp = static_cast<ShaderPreview *>(customdata);
@@ -1798,10 +1798,7 @@ void PreviewLoadJob::push_load_request(PreviewImage *preview, const eIconSizes i
BLI_thread_queue_push(todo_queue_, &requested_previews_.back());
}
-void PreviewLoadJob::run_fn(void *customdata,
- short *stop,
- short *do_update,
- float *UNUSED(progress))
+void PreviewLoadJob::run_fn(void *customdata, short *stop, short *do_update, float * /*progress*/)
{
PreviewLoadJob *job_data = static_cast<PreviewLoadJob *>(customdata);
@@ -2109,7 +2106,7 @@ void ED_preview_shader_job(const bContext *C,
WM_jobs_start(CTX_wm_manager(C), wm_job);
}
-void ED_preview_kill_jobs(wmWindowManager *wm, Main *UNUSED(bmain))
+void ED_preview_kill_jobs(wmWindowManager *wm, Main * /*bmain*/)
{
if (wm) {
/* This is called to stop all preview jobs before scene data changes, to
diff --git a/source/blender/editors/render/render_shading.cc b/source/blender/editors/render/render_shading.cc
index 6802798adb3..25d5ceb8216 100644
--- a/source/blender/editors/render/render_shading.cc
+++ b/source/blender/editors/render/render_shading.cc
@@ -163,7 +163,7 @@ static bool object_materials_supported_poll(bContext *C)
/** \name Material Slot Add Operator
* \{ */
-static int material_slot_add_exec(bContext *C, wmOperator *UNUSED(op))
+static int material_slot_add_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
Object *ob = ED_object_context(C);
@@ -259,7 +259,7 @@ void OBJECT_OT_material_slot_remove(wmOperatorType *ot)
/** \name Material Slot Assign Operator
* \{ */
-static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op))
+static int material_slot_assign_exec(bContext *C, wmOperator * /*op*/)
{
View3D *v3d = CTX_wm_view3d(C);
bool changed_multi = false;
@@ -475,7 +475,7 @@ static int material_slot_de_select(bContext *C, bool select)
return (changed_multi) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
-static int material_slot_select_exec(bContext *C, wmOperator *UNUSED(op))
+static int material_slot_select_exec(bContext *C, wmOperator * /*op*/)
{
return material_slot_de_select(C, true);
}
@@ -494,7 +494,7 @@ void OBJECT_OT_material_slot_select(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
}
-static int material_slot_deselect_exec(bContext *C, wmOperator *UNUSED(op))
+static int material_slot_deselect_exec(bContext *C, wmOperator * /*op*/)
{
return material_slot_de_select(C, false);
}
@@ -519,7 +519,7 @@ void OBJECT_OT_material_slot_deselect(wmOperatorType *ot)
/** \name Material Slot Copy Operator
* \{ */
-static int material_slot_copy_exec(bContext *C, wmOperator *UNUSED(op))
+static int material_slot_copy_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
Object *ob = ED_object_context(C);
@@ -736,7 +736,7 @@ void OBJECT_OT_material_slot_remove_unused(wmOperatorType *ot)
/** \name New Material Operator
* \{ */
-static int new_material_exec(bContext *C, wmOperator *UNUSED(op))
+static int new_material_exec(bContext *C, wmOperator * /*op*/)
{
Material *ma = static_cast<Material *>(
CTX_data_pointer_get_type(C, "material", &RNA_Material).data);
@@ -812,7 +812,7 @@ void MATERIAL_OT_new(wmOperatorType *ot)
/** \name New Texture Operator
* \{ */
-static int new_texture_exec(bContext *C, wmOperator *UNUSED(op))
+static int new_texture_exec(bContext *C, wmOperator * /*op*/)
{
Tex *tex = static_cast<Tex *>(CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data);
Main *bmain = CTX_data_main(C);
@@ -865,7 +865,7 @@ void TEXTURE_OT_new(wmOperatorType *ot)
/** \name new world operator
* \{ */
-static int new_world_exec(bContext *C, wmOperator *UNUSED(op))
+static int new_world_exec(bContext *C, wmOperator * /*op*/)
{
World *wo = static_cast<World *>(CTX_data_pointer_get_type(C, "world", &RNA_World).data);
Main *bmain = CTX_data_main(C);
@@ -982,7 +982,7 @@ static bool view_layer_remove_poll(bContext *C)
return (scene->view_layers.first != scene->view_layers.last);
}
-static int view_layer_remove_exec(bContext *C, wmOperator *UNUSED(op))
+static int view_layer_remove_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
@@ -1018,7 +1018,7 @@ void SCENE_OT_view_layer_remove(wmOperatorType *ot)
/** \name View Layer Add AOV Operator
* \{ */
-static int view_layer_add_aov_exec(bContext *C, wmOperator *UNUSED(op))
+static int view_layer_add_aov_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1066,7 +1066,7 @@ void SCENE_OT_view_layer_add_aov(wmOperatorType *ot)
/** \name View Layer Remove AOV Operator
* \{ */
-static int view_layer_remove_aov_exec(bContext *C, wmOperator *UNUSED(op))
+static int view_layer_remove_aov_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1178,7 +1178,7 @@ void SCENE_OT_view_layer_add_lightgroup(wmOperatorType *ot)
/** \name View Layer Remove Lightgroup Operator
* \{ */
-static int view_layer_remove_lightgroup_exec(bContext *C, wmOperator *UNUSED(op))
+static int view_layer_remove_lightgroup_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1238,7 +1238,7 @@ static GSet *get_used_lightgroups(Scene *scene)
return used_lightgroups;
}
-static int view_layer_add_used_lightgroups_exec(bContext *C, wmOperator *UNUSED(op))
+static int view_layer_add_used_lightgroups_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1284,7 +1284,7 @@ void SCENE_OT_view_layer_add_used_lightgroups(wmOperatorType *ot)
/** \name View Layer Remove Unused Lightgroups Operator
* \{ */
-static int view_layer_remove_unused_lightgroups_exec(bContext *C, wmOperator *UNUSED(op))
+static int view_layer_remove_unused_lightgroups_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1411,7 +1411,7 @@ static int light_cache_bake_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int light_cache_bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int light_cache_bake_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
wmWindowManager *wm = CTX_wm_manager(C);
wmWindow *win = CTX_wm_window(C);
@@ -1505,7 +1505,7 @@ static bool light_cache_free_poll(bContext *C)
return scene->eevee.light_cache_data;
}
-static int light_cache_free_exec(bContext *C, wmOperator *UNUSED(op))
+static int light_cache_free_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
@@ -1555,7 +1555,7 @@ static bool render_view_remove_poll(bContext *C)
return scene->r.actview > 1;
}
-static int render_view_add_exec(bContext *C, wmOperator *UNUSED(op))
+static int render_view_add_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
@@ -1587,7 +1587,7 @@ void SCENE_OT_render_view_add(wmOperatorType *ot)
/** \name Render View Add Operator
* \{ */
-static int render_view_remove_exec(bContext *C, wmOperator *UNUSED(op))
+static int render_view_remove_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
SceneRenderView *rv = static_cast<SceneRenderView *>(
@@ -1651,7 +1651,7 @@ static bool freestyle_active_module_poll(bContext *C)
return module != nullptr;
}
-static int freestyle_module_add_exec(bContext *C, wmOperator *UNUSED(op))
+static int freestyle_module_add_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1683,7 +1683,7 @@ void SCENE_OT_freestyle_module_add(wmOperatorType *ot)
/** \name Free Style Module Remove Operator
* \{ */
-static int freestyle_module_remove_exec(bContext *C, wmOperator *UNUSED(op))
+static int freestyle_module_remove_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1770,7 +1770,7 @@ void SCENE_OT_freestyle_module_move(wmOperatorType *ot)
/** \name Free Style Line Set Add Operator
* \{ */
-static int freestyle_lineset_add_exec(bContext *C, wmOperator *UNUSED(op))
+static int freestyle_lineset_add_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
@@ -1815,7 +1815,7 @@ static bool freestyle_active_lineset_poll(bContext *C)
return BKE_freestyle_lineset_get_active(&view_layer->freestyle_config) != nullptr;
}
-static int freestyle_lineset_copy_exec(bContext *C, wmOperator *UNUSED(op))
+static int freestyle_lineset_copy_exec(bContext *C, wmOperator * /*op*/)
{
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1845,7 +1845,7 @@ void SCENE_OT_freestyle_lineset_copy(wmOperatorType *ot)
/** \name Free Style Line Set Paste Operator
* \{ */
-static int freestyle_lineset_paste_exec(bContext *C, wmOperator *UNUSED(op))
+static int freestyle_lineset_paste_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1879,7 +1879,7 @@ void SCENE_OT_freestyle_lineset_paste(wmOperatorType *ot)
/** \name Free Style Line Set Remove Operator
* \{ */
-static int freestyle_lineset_remove_exec(bContext *C, wmOperator *UNUSED(op))
+static int freestyle_lineset_remove_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -2517,7 +2517,7 @@ void TEXTURE_OT_slot_move(wmOperatorType *ot)
* \{ */
/* material copy/paste */
-static int copy_material_exec(bContext *C, wmOperator *UNUSED(op))
+static int copy_material_exec(bContext *C, wmOperator * /*op*/)
{
Material *ma = static_cast<Material *>(
CTX_data_pointer_get_type(C, "material", &RNA_Material).data);
@@ -2552,7 +2552,7 @@ void MATERIAL_OT_copy(wmOperatorType *ot)
/** \name Material Paste Operator
* \{ */
-static int paste_material_exec(bContext *C, wmOperator *UNUSED(op))
+static int paste_material_exec(bContext *C, wmOperator * /*op*/)
{
Material *ma = static_cast<Material *>(
CTX_data_pointer_get_type(C, "material", &RNA_Material).data);
@@ -2661,7 +2661,7 @@ static void paste_mtex_copybuf(ID *id)
/** \name Texture Slot Copy Operator
* \{ */
-static int copy_mtex_exec(bContext *C, wmOperator *UNUSED(op))
+static int copy_mtex_exec(bContext *C, wmOperator * /*op*/)
{
ID *id = CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).owner_id;
@@ -2705,7 +2705,7 @@ void TEXTURE_OT_slot_copy(wmOperatorType *ot)
/** \name Texture Slot Paste Operator
* \{ */
-static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op))
+static int paste_mtex_exec(bContext *C, wmOperator * /*op*/)
{
ID *id = CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).owner_id;
diff --git a/source/blender/editors/render/render_update.cc b/source/blender/editors/render/render_update.cc
index 7cefcf9815e..8aadb9edf6a 100644
--- a/source/blender/editors/render/render_update.cc
+++ b/source/blender/editors/render/render_update.cc
@@ -226,13 +226,13 @@ void ED_render_view_layer_changed(Main *bmain, bScreen *screen)
* we can get rid of the manual dependency checks.
* \{ */
-static void material_changed(Main *UNUSED(bmain), Material *ma)
+static void material_changed(Main * /*bmain*/, Material *ma)
{
/* icons */
BKE_icon_changed(BKE_icon_id_ensure(&ma->id));
}
-static void lamp_changed(Main *UNUSED(bmain), Light *la)
+static void lamp_changed(Main * /*bmain*/, Light *la)
{
/* icons */
BKE_icon_changed(BKE_icon_id_ensure(&la->id));
@@ -265,7 +265,7 @@ static void texture_changed(Main *bmain, Tex *tex)
}
}
-static void world_changed(Main *UNUSED(bmain), World *wo)
+static void world_changed(Main * /*bmain*/, World *wo)
{
/* icons */
BKE_icon_changed(BKE_icon_id_ensure(&wo->id));
diff --git a/source/blender/editors/render/render_view.cc b/source/blender/editors/render/render_view.cc
index 7569b3600a1..f0427bf8683 100644
--- a/source/blender/editors/render/render_view.cc
+++ b/source/blender/editors/render/render_view.cc
@@ -256,7 +256,7 @@ ScrArea *render_view_open(bContext *C, int mx, int my, ReportList *reports)
/*************************** cancel render viewer **********************/
-static int render_view_cancel_exec(bContext *C, wmOperator *UNUSED(op))
+static int render_view_cancel_exec(bContext *C, wmOperator * /*op*/)
{
wmWindow *win = CTX_wm_window(C);
ScrArea *area = CTX_wm_area(C);
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_add.cc b/source/blender/editors/sculpt_paint/curves_sculpt_add.cc
index 00130e6d19e..0d2c2d3f0c9 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_add.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_add.cc
@@ -418,7 +418,7 @@ struct AddOperationExecutor {
*surface_bvh_eval_.tree,
brush_pos_su,
brush_radius_su,
- [&](const int index, const float3 &UNUSED(co), const float UNUSED(dist_sq)) {
+ [&](const int index, const float3 & /*co*/, const float /*dist_sq*/) {
const MLoopTri &looptri = surface_looptris_eval_[index];
const float3 v0_su = surface_verts_eval_[surface_loops_eval_[looptri.tri[0]].v].co;
const float3 v1_su = surface_verts_eval_[surface_loops_eval_[looptri.tri[1]].v].co;
@@ -436,7 +436,7 @@ struct AddOperationExecutor {
*surface_bvh_eval_.tree,
brush_pos_su,
brush_radius_su,
- [&](const int index, const float3 &UNUSED(co), const float UNUSED(dist_sq)) {
+ [&](const int index, const float3 & /*co*/, const float /*dist_sq*/) {
selected_looptri_indices.append(index);
});
}
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_density.cc b/source/blender/editors/sculpt_paint/curves_sculpt_density.cc
index 2cd4528503e..78e2d55e6b9 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_density.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_density.cc
@@ -234,7 +234,7 @@ struct DensityAddOperationExecutor {
new_roots_kdtree,
root_pos_cu,
brush_settings_->minimum_distance,
- [&](const int other_new_i, const float *UNUSED(co), float UNUSED(dist_sq)) {
+ [&](const int other_new_i, const float * /*co*/, float /*dist_sq*/) {
if (other_new_i == -1) {
new_curve_skipped[new_i] = true;
return false;
@@ -415,7 +415,7 @@ struct DensityAddOperationExecutor {
*surface_bvh_eval_.tree,
brush_pos_su,
brush_radius_su,
- [&](const int index, const float3 &UNUSED(co), const float UNUSED(dist_sq)) {
+ [&](const int index, const float3 & /*co*/, const float /*dist_sq*/) {
selected_looptri_indices.append(index);
});
@@ -687,7 +687,7 @@ struct DensitySubtractOperationExecutor {
root_points_kdtree_,
orig_pos_cu,
minimum_distance_,
- [&](const int other_curve_i, const float *UNUSED(co), float UNUSED(dist_sq)) {
+ [&](const int other_curve_i, const float * /*co*/, float /*dist_sq*/) {
if (other_curve_i == curve_i) {
return true;
}
@@ -772,7 +772,7 @@ struct DensitySubtractOperationExecutor {
root_points_kdtree_,
pos_cu,
minimum_distance_,
- [&](const int other_curve_i, const float *UNUSED(co), float UNUSED(dist_sq)) {
+ [&](const int other_curve_i, const float * /*co*/, float /*dist_sq*/) {
if (other_curve_i == curve_i) {
return true;
}
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
index 3068ce9417b..6366da310b6 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
@@ -153,7 +153,7 @@ struct SculptCurvesBrushStrokeData {
static bool stroke_get_location(bContext *C,
float out[3],
const float mouse[2],
- bool UNUSED(force_original))
+ bool /*force_original*/)
{
out[0] = mouse[0];
out[1] = mouse[1];
@@ -170,7 +170,7 @@ static bool stroke_test_start(bContext *C, struct wmOperator *op, const float mo
static void stroke_update_step(bContext *C,
wmOperator *op,
- PaintStroke *UNUSED(stroke),
+ PaintStroke * /*stroke*/,
PointerRNA *stroke_element)
{
SculptCurvesBrushStrokeData *op_data = static_cast<SculptCurvesBrushStrokeData *>(
@@ -448,7 +448,7 @@ static int select_random_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static void select_random_ui(bContext *UNUSED(C), wmOperator *op)
+static void select_random_ui(bContext * /*C*/, wmOperator *op)
{
uiLayout *layout = op->layout;
@@ -1003,7 +1003,7 @@ static int calculate_points_per_side(bContext *C, MinDistanceEditData &op_data)
return std::min(300, needed_points);
}
-static void min_distance_edit_draw(bContext *C, int UNUSED(x), int UNUSED(y), void *customdata)
+static void min_distance_edit_draw(bContext *C, int /*x*/, int /*y*/, void *customdata)
{
Scene *scene = CTX_data_scene(C);
MinDistanceEditData &op_data = *static_cast<MinDistanceEditData *>(customdata);
diff --git a/source/blender/editors/sculpt_paint/paint_image.cc b/source/blender/editors/sculpt_paint/paint_image.cc
index 619002a1bea..23cf65cd90a 100644
--- a/source/blender/editors/sculpt_paint/paint_image.cc
+++ b/source/blender/editors/sculpt_paint/paint_image.cc
@@ -546,7 +546,7 @@ static int grab_clone_modal(bContext *C, wmOperator *op, const wmEvent *event)
return OPERATOR_RUNNING_MODAL;
}
-static void grab_clone_cancel(bContext *UNUSED(C), wmOperator *op)
+static void grab_clone_cancel(bContext * /*C*/, wmOperator *op)
{
GrabClone *cmv = static_cast<GrabClone *>(op->customdata);
MEM_delete(cmv);
@@ -911,7 +911,7 @@ void PAINT_OT_texture_paint_toggle(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int brush_colors_flip_exec(bContext *C, wmOperator *UNUSED(op))
+static int brush_colors_flip_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
diff --git a/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc b/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc
index 5d50cdb4d1f..a5dd558e27a 100644
--- a/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc
+++ b/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc
@@ -81,14 +81,14 @@ class ImagePaintMode : public AbstractPaintMode {
public:
void *paint_new_stroke(bContext *C,
wmOperator *op,
- Object *UNUSED(ob),
+ Object * /*ob*/,
const float UNUSED(mouse[2]),
int mode) override
{
return paint_2d_new_stroke(C, op, mode);
}
- void paint_stroke(bContext *UNUSED(C),
+ void paint_stroke(bContext * /*C*/,
void *stroke_handle,
float prev_mouse[2],
float mouse[2],
@@ -111,9 +111,9 @@ class ImagePaintMode : public AbstractPaintMode {
}
void paint_gradient_fill(const bContext *C,
- const Scene *UNUSED(scene),
+ const Scene * /*scene*/,
Brush *brush,
- struct PaintStroke *UNUSED(stroke),
+ struct PaintStroke * /*stroke*/,
void *stroke_handle,
float mouse_start[2],
float mouse_end[2]) override
@@ -143,7 +143,7 @@ class ImagePaintMode : public AbstractPaintMode {
class ProjectionPaintMode : public AbstractPaintMode {
public:
void *paint_new_stroke(
- bContext *C, wmOperator *UNUSED(op), Object *ob, const float mouse[2], int mode) override
+ bContext *C, wmOperator * /*op*/, Object *ob, const float mouse[2], int mode) override
{
return paint_proj_new_stroke(C, ob, mouse, mode);
}
@@ -240,7 +240,7 @@ struct PaintOperation {
}
};
-static void gradient_draw_line(bContext *UNUSED(C), int x, int y, void *customdata)
+static void gradient_draw_line(bContext * /*C*/, int x, int y, void *customdata)
{
PaintOperation *pop = (PaintOperation *)customdata;
@@ -330,7 +330,7 @@ static PaintOperation *texture_paint_init(bContext *C, wmOperator *op, const flo
}
static void paint_stroke_update_step(bContext *C,
- wmOperator *UNUSED(op),
+ wmOperator * /*op*/,
struct PaintStroke *stroke,
PointerRNA *itemptr)
{
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc
index a11cbfa52af..ae1db0b1ce4 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex.cc
@@ -398,7 +398,7 @@ static float wpaint_blend(const VPaint *wp,
float weight,
const float alpha,
float paintval,
- const float UNUSED(brush_alpha_value),
+ const float /*brush_alpha_value*/,
const bool do_flip)
{
const Brush *brush = wp->paint.brush;
@@ -1902,7 +1902,7 @@ static float wpaint_get_active_weight(const MDeformVert *dv, const WeightPaintIn
static void do_wpaint_precompute_weight_cb_ex(void *__restrict userdata,
const int n,
- const TaskParallelTLS *__restrict UNUSED(tls))
+ const TaskParallelTLS *__restrict /*tls*/)
{
SculptThreadedTaskData *data = (SculptThreadedTaskData *)userdata;
const MDeformVert *dv = &data->wpi->dvert[n];
@@ -1934,7 +1934,7 @@ static void precompute_weight_values(
static void do_wpaint_brush_blur_task_cb_ex(void *__restrict userdata,
const int n,
- const TaskParallelTLS *__restrict UNUSED(tls))
+ const TaskParallelTLS *__restrict /*tls*/)
{
SculptThreadedTaskData *data = (SculptThreadedTaskData *)userdata;
SculptSession *ss = data->ob->sculpt;
@@ -2027,7 +2027,7 @@ static void do_wpaint_brush_blur_task_cb_ex(void *__restrict userdata,
static void do_wpaint_brush_smear_task_cb_ex(void *__restrict userdata,
const int n,
- const TaskParallelTLS *__restrict UNUSED(tls))
+ const TaskParallelTLS *__restrict /*tls*/)
{
SculptThreadedTaskData *data = (SculptThreadedTaskData *)userdata;
SculptSession *ss = data->ob->sculpt;
@@ -2140,7 +2140,7 @@ static void do_wpaint_brush_smear_task_cb_ex(void *__restrict userdata,
static void do_wpaint_brush_draw_task_cb_ex(void *__restrict userdata,
const int n,
- const TaskParallelTLS *__restrict UNUSED(tls))
+ const TaskParallelTLS *__restrict /*tls*/)
{
SculptThreadedTaskData *data = (SculptThreadedTaskData *)userdata;
SculptSession *ss = data->ob->sculpt;
@@ -2212,8 +2212,9 @@ static void do_wpaint_brush_draw_task_cb_ex(void *__restrict userdata,
BKE_pbvh_vertex_iter_end;
}
-static void do_wpaint_brush_calc_average_weight_cb_ex(
- void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
+static void do_wpaint_brush_calc_average_weight_cb_ex(void *__restrict userdata,
+ const int n,
+ const TaskParallelTLS *__restrict /*tls*/)
{
SculptThreadedTaskData *data = (SculptThreadedTaskData *)userdata;
SculptSession *ss = data->ob->sculpt;
@@ -2263,7 +2264,7 @@ static void do_wpaint_brush_calc_average_weight_cb_ex(
}
static void calculate_average_weight(SculptThreadedTaskData *data,
- PBVHNode **UNUSED(nodes),
+ PBVHNode ** /*nodes*/,
int totnode)
{
WPaintAverageAccum *accum = (WPaintAverageAccum *)MEM_mallocN(sizeof(*accum) * totnode,
@@ -2483,7 +2484,7 @@ static void wpaint_do_symmetrical_brush_actions(
}
static void wpaint_stroke_update_step(bContext *C,
- wmOperator *UNUSED(op),
+ wmOperator * /*op*/,
PaintStroke *stroke,
PointerRNA *itemptr)
{
@@ -2952,7 +2953,7 @@ static bool vpaint_stroke_test_start(bContext *C, wmOperator *op, const float mo
template<class Color = ColorPaint4b, typename Traits = ByteTraits>
static void do_vpaint_brush_blur_loops(bContext *C,
- Sculpt *UNUSED(sd),
+ Sculpt * /*sd*/,
VPaint *vp,
VPaintData<Color, Traits, ATTR_DOMAIN_CORNER> *vpd,
Object *ob,
@@ -3097,7 +3098,7 @@ static void do_vpaint_brush_blur_loops(bContext *C,
template<class Color = ColorPaint4b, typename Traits = ByteTraits>
static void do_vpaint_brush_blur_verts(bContext *C,
- Sculpt *UNUSED(sd),
+ Sculpt * /*sd*/,
VPaint *vp,
VPaintData<Color, Traits, ATTR_DOMAIN_POINT> *vpd,
Object *ob,
@@ -3245,7 +3246,7 @@ static void do_vpaint_brush_blur_verts(bContext *C,
template<typename Color = ColorPaint4b, typename Traits, eAttrDomain domain>
static void do_vpaint_brush_smear(bContext *C,
- Sculpt *UNUSED(sd),
+ Sculpt * /*sd*/,
VPaint *vp,
VPaintData<Color, Traits, domain> *vpd,
Object *ob,
@@ -3538,7 +3539,7 @@ static float paint_and_tex_color_alpha(VPaint *vp,
template<typename Color, typename Traits, eAttrDomain domain>
static void vpaint_do_draw(bContext *C,
- Sculpt *UNUSED(sd),
+ Sculpt * /*sd*/,
VPaint *vp,
VPaintData<Color, Traits, domain> *vpd,
Object *ob,
@@ -3883,7 +3884,7 @@ static void vpaint_stroke_update_step_intern(bContext *C, PaintStroke *stroke, P
}
static void vpaint_stroke_update_step(bContext *C,
- wmOperator *UNUSED(op),
+ wmOperator * /*op*/,
PaintStroke *stroke,
PointerRNA *itemptr)
{
@@ -3912,7 +3913,7 @@ static void vpaint_stroke_update_step(bContext *C,
}
template<typename Color, typename Traits, eAttrDomain domain>
-static void vpaint_free_vpaintdata(Object *UNUSED(ob), void *_vpd)
+static void vpaint_free_vpaintdata(Object * /*ob*/, void *_vpd)
{
VPaintData<Color, Traits, domain> *vpd = static_cast<VPaintData<Color, Traits, domain> *>(_vpd);
@@ -4210,7 +4211,7 @@ extern "C" bool BKE_object_attributes_active_color_fill(Object *ob,
return paint_object_attributes_active_color_fill_ex(ob, ColorPaint4f(fill_color), only_selected);
}
-static int vertex_color_set_exec(bContext *C, wmOperator *UNUSED(op))
+static int vertex_color_set_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
Object *obact = CTX_data_active_object(C);
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc b/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc
index 2f448dc056b..c2b60f1d2d1 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc
@@ -120,7 +120,7 @@ static bool vertex_paint_from_weight(Object *ob)
return true;
}
-static int vertex_paint_from_weight_exec(bContext *C, wmOperator *UNUSED(op))
+static int vertex_paint_from_weight_exec(bContext *C, wmOperator * /*op*/)
{
Object *obact = CTX_data_active_object(C);
if (vertex_paint_from_weight(obact)) {
@@ -217,7 +217,7 @@ static bool vertex_color_smooth(Object *ob)
return true;
}
-static int vertex_color_smooth_exec(bContext *C, wmOperator *UNUSED(op))
+static int vertex_color_smooth_exec(bContext *C, wmOperator * /*op*/)
{
Object *obact = CTX_data_active_object(C);
if (vertex_color_smooth(obact)) {
@@ -419,7 +419,7 @@ void PAINT_OT_vertex_color_hsv(wmOperatorType *ot)
RNA_def_float(ot->srna, "v", 1.0f, 0.0f, 2.0f, "Value", "", 0.0f, 2.0f);
}
-static int vertex_color_invert_exec(bContext *C, wmOperator *UNUSED(op))
+static int vertex_color_invert_exec(bContext *C, wmOperator * /*op*/)
{
Object *obact = CTX_data_active_object(C);
diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.cc b/source/blender/editors/sculpt_paint/sculpt_face_set.cc
index fb8d72f02bd..79c1304eee5 100644
--- a/source/blender/editors/sculpt_paint/sculpt_face_set.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_face_set.cc
@@ -995,7 +995,7 @@ void SCULPT_OT_face_sets_change_visibility(wmOperatorType *ot)
"");
}
-static int sculpt_face_sets_randomize_colors_exec(bContext *C, wmOperator *UNUSED(op))
+static int sculpt_face_sets_randomize_colors_exec(bContext *C, wmOperator * /*op*/)
{
Object *ob = CTX_data_active_object(C);
diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc
index 6dfb01cec20..8d6fbaa5988 100644
--- a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc
@@ -431,7 +431,7 @@ static void push_undo(const NodeData &node_data,
static void do_push_undo_tile(void *__restrict userdata,
const int n,
- const TaskParallelTLS *__restrict UNUSED(tls))
+ const TaskParallelTLS *__restrict /*tls*/)
{
TexturePaintingUserData *data = static_cast<TexturePaintingUserData *>(userdata);
PBVHNode *node = data->nodes[n];
@@ -460,7 +460,7 @@ static void do_push_undo_tile(void *__restrict userdata,
static void do_mark_dirty_regions(void *__restrict userdata,
const int n,
- const TaskParallelTLS *__restrict UNUSED(tls))
+ const TaskParallelTLS *__restrict /*tls*/)
{
TexturePaintingUserData *data = static_cast<TexturePaintingUserData *>(userdata);
PBVHNode *node = data->nodes[n];
diff --git a/source/blender/editors/space_file/asset_catalog_tree_view.cc b/source/blender/editors/space_file/asset_catalog_tree_view.cc
index 1829f19bfd6..a45dd078401 100644
--- a/source/blender/editors/space_file/asset_catalog_tree_view.cc
+++ b/source/blender/editors/space_file/asset_catalog_tree_view.cc
@@ -598,7 +598,7 @@ std::string AssetCatalogTreeViewAllItem::DropController::drop_tooltip(const wmDr
TIP_("to the top level of the tree");
}
-bool AssetCatalogTreeViewAllItem::DropController::on_drop(struct bContext *UNUSED(C),
+bool AssetCatalogTreeViewAllItem::DropController::on_drop(struct bContext */*C*/,
const wmDrag &drag)
{
BLI_assert(drag.type == WM_DRAG_ASSET_CATALOG);
diff --git a/source/blender/editors/space_file/file_indexer.cc b/source/blender/editors/space_file/file_indexer.cc
index 7c2ec1a30fd..ec631eb48b3 100644
--- a/source/blender/editors/space_file/file_indexer.cc
+++ b/source/blender/editors/space_file/file_indexer.cc
@@ -17,17 +17,17 @@
namespace blender::ed::file::indexer {
-static eFileIndexerResult read_index(const char *UNUSED(file_name),
- FileIndexerEntries *UNUSED(entries),
- int *UNUSED(r_read_entries_len),
- void *UNUSED(user_data))
+static eFileIndexerResult read_index(const char * /*file_name*/,
+ FileIndexerEntries * /*entries*/,
+ int * /*r_read_entries_len*/,
+ void * /*user_data*/)
{
return FILE_INDEXER_NEEDS_UPDATE;
}
-static void update_index(const char *UNUSED(file_name),
- FileIndexerEntries *UNUSED(entries),
- void *UNUSED(user_data))
+static void update_index(const char * /*file_name*/,
+ FileIndexerEntries * /*entries*/,
+ void * /*user_data*/)
{
}
diff --git a/source/blender/editors/space_file/filelist.cc b/source/blender/editors/space_file/filelist.cc
index 1eb67da0347..d72d7cb14d0 100644
--- a/source/blender/editors/space_file/filelist.cc
+++ b/source/blender/editors/space_file/filelist.cc
@@ -733,7 +733,7 @@ static bool is_filtered_file_type(const FileListInternEntry *file, const FileLis
/** \return true when the file should be in the result set, false if it should be filtered out. */
static bool is_filtered_file(FileListInternEntry *file,
- const char *UNUSED(root),
+ const char * /*root*/,
FileListFilter *filter)
{
return is_filtered_file_type(file, filter) &&
@@ -858,14 +858,14 @@ static bool is_filtered_lib(FileListInternEntry *file, const char *root, FileLis
}
static bool is_filtered_main(FileListInternEntry *file,
- const char *UNUSED(dir),
+ const char * /*dir*/,
FileListFilter *filter)
{
return !is_filtered_hidden(file->relpath, filter, file);
}
static bool is_filtered_main_assets(FileListInternEntry *file,
- const char *UNUSED(dir),
+ const char * /*dir*/,
FileListFilter *filter)
{
/* "Filtered" means *not* being filtered out... So return true if the file should be visible. */
@@ -1308,7 +1308,7 @@ static void parent_dir_until_exists_or_default_root(char *dir)
}
}
-static bool filelist_checkdir_dir(struct FileList *UNUSED(filelist),
+static bool filelist_checkdir_dir(struct FileList * /*filelist*/,
char *r_dir,
const bool do_change)
{
@@ -1319,7 +1319,7 @@ static bool filelist_checkdir_dir(struct FileList *UNUSED(filelist),
return BLI_is_dir(r_dir);
}
-static bool filelist_checkdir_lib(struct FileList *UNUSED(filelist),
+static bool filelist_checkdir_lib(struct FileList * /*filelist*/,
char *r_dir,
const bool do_change)
{
@@ -1344,9 +1344,9 @@ static bool filelist_checkdir_main(struct FileList *filelist, char *r_dir, const
return filelist_checkdir_lib(filelist, r_dir, do_change);
}
-static bool filelist_checkdir_main_assets(struct FileList *UNUSED(filelist),
- char *UNUSED(r_dir),
- const bool UNUSED(do_change))
+static bool filelist_checkdir_main_assets(struct FileList * /*filelist*/,
+ char * /*r_dir*/,
+ const bool /*do_change*/)
{
/* Main is always valid. */
return true;
@@ -1491,7 +1491,7 @@ static void filelist_cache_preview_runf(TaskPool *__restrict pool, void *taskdat
// printf("%s: End (%d)...\n", __func__, threadid);
}
-static void filelist_cache_preview_freef(TaskPool *__restrict UNUSED(pool), void *taskdata)
+static void filelist_cache_preview_freef(TaskPool *__restrict /*pool*/, void *taskdata)
{
FileListEntryPreviewTaskData *preview_taskdata = static_cast<FileListEntryPreviewTaskData *>(
taskdata);
@@ -3641,9 +3641,9 @@ static void filelist_readjob_load_asset_library_data(FileListReadJob *job_params
}
static void filelist_readjob_main_assets_add_items(FileListReadJob *job_params,
- short *UNUSED(stop),
+ short * /*stop*/,
short *do_update,
- float *UNUSED(progress))
+ float * /*progress*/)
{
FileList *filelist = job_params->tmp_filelist; /* Use the thread-safe filelist queue. */
diff --git a/source/blender/editors/space_image/image_undo.cc b/source/blender/editors/space_image/image_undo.cc
index 8f144264824..1589195d2af 100644
--- a/source/blender/editors/space_image/image_undo.cc
+++ b/source/blender/editors/space_image/image_undo.cc
@@ -637,7 +637,7 @@ static void uhandle_free_list(ListBase *undo_handles)
/** #UndoImageHandle utilities */
static UndoImageBuf *uhandle_lookup_ubuf(UndoImageHandle *uh,
- const Image *UNUSED(image),
+ const Image * /*image*/,
const char *ibuf_name)
{
LISTBASE_FOREACH (UndoImageBuf *, ubuf, &uh->buffers) {
@@ -775,7 +775,7 @@ static bool image_undosys_poll(bContext *C)
return false;
}
-static void image_undosys_step_encode_init(struct bContext *UNUSED(C), UndoStep *us_p)
+static void image_undosys_step_encode_init(struct bContext * /*C*/, UndoStep *us_p)
{
ImageUndoStep *us = reinterpret_cast<ImageUndoStep *>(us_p);
/* dummy, memory is cleared anyway. */
@@ -784,9 +784,7 @@ static void image_undosys_step_encode_init(struct bContext *UNUSED(C), UndoStep
us->paint_tile_map = MEM_new<PaintTileMap>(__func__);
}
-static bool image_undosys_step_encode(struct bContext *C,
- struct Main *UNUSED(bmain),
- UndoStep *us_p)
+static bool image_undosys_step_encode(struct bContext *C, struct Main * /*bmain*/, UndoStep *us_p)
{
/* Encoding is done along the way by adding tiles
* to the current 'ImageUndoStep' added by encode_init.
diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc
index 93166c6de59..df31a0342cb 100644
--- a/source/blender/editors/space_node/drawnode.cc
+++ b/source/blender/editors/space_node/drawnode.cc
@@ -73,10 +73,10 @@ namespace blender::ed::space_node {
/* ****************** SOCKET BUTTON DRAW FUNCTIONS ***************** */
-static void node_socket_button_label(bContext *UNUSED(C),
+static void node_socket_button_label(bContext * /*C*/,
uiLayout *layout,
- PointerRNA *UNUSED(ptr),
- PointerRNA *UNUSED(node_ptr),
+ PointerRNA * /*ptr*/,
+ PointerRNA * /*node_ptr*/,
const char *text)
{
uiItemL(layout, text, 0);
@@ -84,7 +84,7 @@ static void node_socket_button_label(bContext *UNUSED(C),
/* ****************** BUTTON CALLBACKS FOR ALL TREES ***************** */
-static void node_buts_value(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_buts_value(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
bNode *node = (bNode *)ptr->data;
/* first output stores value */
@@ -95,7 +95,7 @@ static void node_buts_value(uiLayout *layout, bContext *UNUSED(C), PointerRNA *p
uiItemR(layout, &sockptr, "default_value", DEFAULT_FLAGS, "", ICON_NONE);
}
-static void node_buts_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_buts_rgb(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
bNode *node = (bNode *)ptr->data;
/* first output stores value */
@@ -109,7 +109,7 @@ static void node_buts_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr
uiItemR(col, &sockptr, "default_value", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
}
-static void node_buts_mix_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_buts_mix_rgb(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
bNodeTree *ntree = (bNodeTree *)ptr->owner_id;
@@ -123,7 +123,7 @@ static void node_buts_mix_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA
uiItemR(col, ptr, "use_clamp", DEFAULT_FLAGS, nullptr, ICON_NONE);
}
-static void node_buts_time(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_buts_time(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiTemplateCurveMapping(layout, ptr, "curve", 's', false, false, false, false);
@@ -132,17 +132,17 @@ static void node_buts_time(uiLayout *layout, bContext *UNUSED(C), PointerRNA *pt
uiItemR(col, ptr, "frame_end", DEFAULT_FLAGS, IFACE_("End"), ICON_NONE);
}
-static void node_buts_colorramp(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_buts_colorramp(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiTemplateColorRamp(layout, ptr, "color_ramp", false);
}
-static void node_buts_curvevec(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_buts_curvevec(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiTemplateCurveMapping(layout, ptr, "mapping", 'v', false, false, false, false);
}
-static void node_buts_curvefloat(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_buts_curvefloat(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiTemplateCurveMapping(layout, ptr, "mapping", 0, false, false, false, false);
}
@@ -164,7 +164,7 @@ void ED_node_sample_set(const float col[4])
namespace blender::ed::space_node {
-static void node_buts_curvecol(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_buts_curvecol(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
bNode *node = (bNode *)ptr->data;
CurveMapping *cumap = (CurveMapping *)node->storage;
@@ -183,7 +183,7 @@ static void node_buts_curvecol(uiLayout *layout, bContext *UNUSED(C), PointerRNA
layout, ptr, "mapping", 'c', false, false, false, (ntree->type == NTREE_COMPOSIT));
}
-static void node_buts_normal(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_buts_normal(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
bNode *node = (bNode *)ptr->data;
/* first output stores normal */
@@ -194,7 +194,7 @@ static void node_buts_normal(uiLayout *layout, bContext *UNUSED(C), PointerRNA *
uiItemR(layout, &sockptr, "default_value", DEFAULT_FLAGS, "", ICON_NONE);
}
-static void node_buts_texture(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_buts_texture(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
bNode *node = (bNode *)ptr->data;
@@ -209,13 +209,13 @@ static void node_buts_texture(uiLayout *layout, bContext *UNUSED(C), PointerRNA
}
}
-static void node_buts_math(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_buts_math(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "operation", DEFAULT_FLAGS, "", ICON_NONE);
uiItemR(layout, ptr, "use_clamp", DEFAULT_FLAGS, nullptr, ICON_NONE);
}
-static void node_buts_combsep_color(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_buts_combsep_color(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "mode", DEFAULT_FLAGS, "", ICON_NONE);
}
@@ -283,7 +283,7 @@ static void node_draw_buttons_group(uiLayout *layout, bContext *C, PointerRNA *p
layout, C, ptr, "node_tree", nullptr, nullptr, nullptr, UI_TEMPLATE_ID_FILTER_ALL, nullptr);
}
-static void node_buts_frame_ex(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_buts_frame_ex(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "label_size", DEFAULT_FLAGS, IFACE_("Label Size"), ICON_NONE);
uiItemR(layout, ptr, "shrink", DEFAULT_FLAGS, IFACE_("Shrink"), ICON_NONE);
@@ -441,17 +441,17 @@ static void node_shader_buts_tex_environment_ex(uiLayout *layout, bContext *C, P
uiItemR(layout, ptr, "projection", DEFAULT_FLAGS, IFACE_("Projection"), ICON_NONE);
}
-static void node_shader_buts_displacement(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_shader_buts_displacement(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "space", DEFAULT_FLAGS, "", 0);
}
-static void node_shader_buts_glossy(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_shader_buts_glossy(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "distribution", DEFAULT_FLAGS, "", ICON_NONE);
}
-static void node_buts_output_shader(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_buts_output_shader(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "target", DEFAULT_FLAGS, "", ICON_NONE);
}
@@ -519,7 +519,7 @@ static void node_shader_set_butfunc(bNodeType *ntype)
/* ****************** BUTTON CALLBACKS FOR COMPOSITE NODES ***************** */
static void node_buts_image_views(uiLayout *layout,
- bContext *UNUSED(C),
+ bContext * /*C*/,
PointerRNA *ptr,
PointerRNA *imaptr)
{
@@ -579,7 +579,7 @@ static void node_composit_buts_image_ex(uiLayout *layout, bContext *C, PointerRN
uiTemplateImage(layout, C, ptr, "image", &iuserptr, false, true);
}
-static void node_composit_buts_huecorrect(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_composit_buts_huecorrect(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
bNode *node = (bNode *)ptr->data;
CurveMapping *cumap = (CurveMapping *)node->storage;
@@ -595,14 +595,12 @@ static void node_composit_buts_huecorrect(uiLayout *layout, bContext *UNUSED(C),
uiTemplateCurveMapping(layout, ptr, "mapping", 'h', false, false, false, false);
}
-static void node_composit_buts_ycc(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_composit_buts_ycc(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "mode", DEFAULT_FLAGS, "", ICON_NONE);
}
-static void node_composit_buts_combsep_color(uiLayout *layout,
- bContext *UNUSED(C),
- PointerRNA *ptr)
+static void node_composit_buts_combsep_color(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
bNode *node = (bNode *)ptr->data;
NodeCMPCombSepColor *storage = (NodeCMPCombSepColor *)node->storage;
@@ -733,7 +731,7 @@ static void node_composit_backdrop_ellipsemask(
}
static void node_composit_buts_cryptomatte_legacy(uiLayout *layout,
- bContext *UNUSED(C),
+ bContext * /*C*/,
PointerRNA *ptr)
{
uiLayout *col = uiLayoutColumn(layout, true);
@@ -748,8 +746,8 @@ static void node_composit_buts_cryptomatte_legacy(uiLayout *layout,
}
static void node_composit_buts_cryptomatte_legacy_ex(uiLayout *layout,
- bContext *UNUSED(C),
- PointerRNA *UNUSED(ptr))
+ bContext * /*C*/,
+ PointerRNA * /*ptr*/)
{
uiItemO(layout, IFACE_("Add Crypto Layer"), ICON_ADD, "NODE_OT_cryptomatte_layer_add");
uiItemO(layout, IFACE_("Remove Crypto Layer"), ICON_REMOVE, "NODE_OT_cryptomatte_layer_remove");
@@ -874,7 +872,7 @@ static void node_composit_set_butfunc(bNodeType *ntype)
/* ****************** BUTTON CALLBACKS FOR TEXTURE NODES ***************** */
-static void node_texture_buts_bricks(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_texture_buts_bricks(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiLayout *col;
@@ -887,7 +885,7 @@ static void node_texture_buts_bricks(uiLayout *layout, bContext *UNUSED(C), Poin
uiItemR(col, ptr, "squash_frequency", DEFAULT_FLAGS, IFACE_("Frequency"), ICON_NONE);
}
-static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_texture_buts_proc(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
PointerRNA tex_ptr;
bNode *node = (bNode *)ptr->data;
@@ -998,12 +996,12 @@ static void node_texture_buts_image_ex(uiLayout *layout, bContext *C, PointerRNA
uiTemplateImage(layout, C, ptr, "image", &iuserptr, false, false);
}
-static void node_texture_buts_output(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_texture_buts_output(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "filepath", DEFAULT_FLAGS, "", ICON_NONE);
}
-static void node_texture_buts_combsep_color(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void node_texture_buts_combsep_color(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "mode", DEFAULT_FLAGS, "", ICON_NONE);
}
@@ -1068,7 +1066,7 @@ static void node_texture_set_butfunc(bNodeType *ntype)
* Only called on node initialization, once.
* \{ */
-static void node_property_update_default(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
+static void node_property_update_default(Main *bmain, Scene * /*scene*/, PointerRNA *ptr)
{
bNodeTree *ntree = (bNodeTree *)ptr->owner_id;
bNode *node = (bNode *)ptr->data;
@@ -1102,18 +1100,18 @@ static void node_template_properties_update(bNodeType *ntype)
}
}
-static void node_socket_undefined_draw(bContext *UNUSED(C),
+static void node_socket_undefined_draw(bContext * /*C*/,
uiLayout *layout,
- PointerRNA *UNUSED(ptr),
- PointerRNA *UNUSED(node_ptr),
- const char *UNUSED(text))
+ PointerRNA * /*ptr*/,
+ PointerRNA * /*node_ptr*/,
+ const char * /*text*/)
{
uiItemL(layout, IFACE_("Undefined Socket Type"), ICON_ERROR);
}
-static void node_socket_undefined_draw_color(bContext *UNUSED(C),
- PointerRNA *UNUSED(ptr),
- PointerRNA *UNUSED(node_ptr),
+static void node_socket_undefined_draw_color(bContext * /*C*/,
+ PointerRNA * /*ptr*/,
+ PointerRNA * /*node_ptr*/,
float *r_color)
{
r_color[0] = 1.0f;
@@ -1122,15 +1120,15 @@ static void node_socket_undefined_draw_color(bContext *UNUSED(C),
r_color[3] = 1.0f;
}
-static void node_socket_undefined_interface_draw(bContext *UNUSED(C),
+static void node_socket_undefined_interface_draw(bContext * /*C*/,
uiLayout *layout,
- PointerRNA *UNUSED(ptr))
+ PointerRNA * /*ptr*/)
{
uiItemL(layout, IFACE_("Undefined Socket Type"), ICON_ERROR);
}
-static void node_socket_undefined_interface_draw_color(bContext *UNUSED(C),
- PointerRNA *UNUSED(ptr),
+static void node_socket_undefined_interface_draw_color(bContext * /*C*/,
+ PointerRNA * /*ptr*/,
float *r_color)
{
r_color[0] = 1.0f;
@@ -1173,7 +1171,7 @@ void ED_node_init_butfuncs()
NODE_TYPES_END;
}
-void ED_init_custom_node_type(bNodeType *UNUSED(ntype))
+void ED_init_custom_node_type(bNodeType * /*ntype*/)
{
}
@@ -1205,18 +1203,16 @@ static const float std_node_socket_colors[][4] = {
};
/* common color callbacks for standard types */
-static void std_node_socket_draw_color(bContext *UNUSED(C),
+static void std_node_socket_draw_color(bContext * /*C*/,
PointerRNA *ptr,
- PointerRNA *UNUSED(node_ptr),
+ PointerRNA * /*node_ptr*/,
float *r_color)
{
bNodeSocket *sock = (bNodeSocket *)ptr->data;
int type = sock->typeinfo->type;
copy_v4_v4(r_color, std_node_socket_colors[type]);
}
-static void std_node_socket_interface_draw_color(bContext *UNUSED(C),
- PointerRNA *ptr,
- float *r_color)
+static void std_node_socket_interface_draw_color(bContext * /*C*/, PointerRNA *ptr, float *r_color)
{
bNodeSocket *sock = (bNodeSocket *)ptr->data;
int type = sock->typeinfo->type;
@@ -1425,7 +1421,7 @@ static void std_node_socket_draw(
}
}
-static void std_node_socket_interface_draw(bContext *UNUSED(C), uiLayout *layout, PointerRNA *ptr)
+static void std_node_socket_interface_draw(bContext * /*C*/, uiLayout *layout, PointerRNA *ptr)
{
bNodeSocket *sock = (bNodeSocket *)ptr->data;
int type = sock->typeinfo->type;
@@ -1469,9 +1465,9 @@ static void std_node_socket_interface_draw(bContext *UNUSED(C), uiLayout *layout
uiItemR(layout, ptr, "hide_value", DEFAULT_FLAGS, nullptr, 0);
}
-static void node_socket_virtual_draw_color(bContext *UNUSED(C),
- PointerRNA *UNUSED(ptr),
- PointerRNA *UNUSED(node_ptr),
+static void node_socket_virtual_draw_color(bContext * /*C*/,
+ PointerRNA * /*ptr*/,
+ PointerRNA * /*node_ptr*/,
float *r_color)
{
copy_v4_v4(r_color, virtual_node_socket_color);
@@ -1908,7 +1904,7 @@ static void nodelink_batch_draw(const SpaceNode &snode)
GPU_blend(GPU_BLEND_NONE);
}
-void nodelink_batch_start(SpaceNode &UNUSED(snode))
+void nodelink_batch_start(SpaceNode & /*snode*/)
{
g_batch_link.enabled = true;
}
diff --git a/source/blender/editors/space_node/node_add.cc b/source/blender/editors/space_node/node_add.cc
index 10e903ca79b..984f9647b34 100644
--- a/source/blender/editors/space_node/node_add.cc
+++ b/source/blender/editors/space_node/node_add.cc
@@ -782,9 +782,9 @@ static int new_node_tree_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static const EnumPropertyItem *new_node_tree_type_itemf(bContext *UNUSED(C),
- PointerRNA *UNUSED(ptr),
- PropertyRNA *UNUSED(prop),
+static const EnumPropertyItem *new_node_tree_type_itemf(bContext * /*C*/,
+ PointerRNA * /*ptr*/,
+ PropertyRNA * /*prop*/,
bool *r_free)
{
return rna_node_tree_type_itemf(nullptr, nullptr, r_free);
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc
index 29dad103dc3..dc155f5e28d 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -1079,7 +1079,7 @@ static bool node_socket_has_tooltip(const bNodeTree &ntree, const bNodeSocket &s
static char *node_socket_get_tooltip(const bContext *C,
const bNodeTree *ntree,
- const bNode *UNUSED(node),
+ const bNode * /*node*/,
const bNodeSocket *socket)
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -1121,7 +1121,7 @@ static char *node_socket_get_tooltip(const bContext *C,
return BLI_strdup(output.str().c_str());
}
-static void node_socket_add_tooltip_in_node_editor(TreeDrawContext *UNUSED(tree_draw_ctx),
+static void node_socket_add_tooltip_in_node_editor(TreeDrawContext * /*tree_draw_ctx*/,
const bNodeTree *ntree,
const bNode *node,
const bNodeSocket *sock,
@@ -1138,7 +1138,7 @@ static void node_socket_add_tooltip_in_node_editor(TreeDrawContext *UNUSED(tree_
uiLayoutSetTooltipFunc(
layout,
- [](bContext *C, void *argN, const char *UNUSED(tip)) {
+ [](bContext *C, void *argN, const char * /*tip*/) {
SocketTooltipData *data = static_cast<SocketTooltipData *>(argN);
return node_socket_get_tooltip(C, data->ntree, data->node, data->socket);
},
@@ -1217,7 +1217,7 @@ static void node_socket_draw_nested(const bContext &C,
UI_but_func_tooltip_set(
but,
- [](bContext *C, void *argN, const char *UNUSED(tip)) {
+ [](bContext *C, void *argN, const char * /*tip*/) {
SocketTooltipData *data = (SocketTooltipData *)argN;
return node_socket_get_tooltip(C, data->ntree, data->node, data->socket);
},
@@ -1626,7 +1626,7 @@ struct NodeErrorsTooltipData {
Span<geo_log::NodeWarning> warnings;
};
-static char *node_errors_tooltip_fn(bContext *UNUSED(C), void *argN, const char *UNUSED(tip))
+static char *node_errors_tooltip_fn(bContext * /*C*/, void *argN, const char * /*tip*/)
{
NodeErrorsTooltipData &data = *(NodeErrorsTooltipData *)argN;
@@ -1786,7 +1786,7 @@ struct NamedAttributeTooltipArg {
Map<StringRefNull, geo_log::NamedAttributeUsage> usage_by_attribute;
};
-static char *named_attribute_tooltip(bContext *UNUSED(C), void *argN, const char *UNUSED(tip))
+static char *named_attribute_tooltip(bContext * /*C*/, void *argN, const char * /*tip*/)
{
NamedAttributeTooltipArg &arg = *static_cast<NamedAttributeTooltipArg *>(argN);
diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc
index 8135369f271..3a80733f06c 100644
--- a/source/blender/editors/space_node/node_edit.cc
+++ b/source/blender/editors/space_node/node_edit.cc
@@ -179,7 +179,7 @@ static int compo_breakjob(void *cjv)
}
/* called by compo, wmJob sends notifier */
-static void compo_statsdrawjob(void *cjv, const char *UNUSED(str))
+static void compo_statsdrawjob(void *cjv, const char * /*str*/)
{
CompoJob *cj = (CompoJob *)cjv;
@@ -234,7 +234,7 @@ static void compo_initjob(void *cjv)
}
/* called before redraw notifiers, it moves finished previews over */
-static void compo_updatejob(void *UNUSED(cjv))
+static void compo_updatejob(void * /*cjv*/)
{
WM_main_add_notifier(NC_SCENE | ND_COMPO_RESULT, nullptr);
}
@@ -443,11 +443,11 @@ void ED_node_tree_propagate_change(const bContext *C, Main *bmain, bNodeTree *ro
}
NodeTreeUpdateExtraParams params = {nullptr};
- params.tree_changed_fn = [](ID *id, bNodeTree *ntree, void *UNUSED(user_data)) {
+ params.tree_changed_fn = [](ID *id, bNodeTree *ntree, void * /*user_data*/) {
blender::ed::space_node::send_notifiers_after_tree_change(id, ntree);
DEG_id_tag_update(&ntree->id, ID_RECALC_COPY_ON_WRITE);
};
- params.tree_output_changed_fn = [](ID *UNUSED(id), bNodeTree *ntree, void *UNUSED(user_data)) {
+ params.tree_output_changed_fn = [](ID * /*id*/, bNodeTree *ntree, void * /*user_data*/) {
DEG_id_tag_update(&ntree->id, ID_RECALC_NTREE_OUTPUT);
};
@@ -828,7 +828,7 @@ void ED_node_set_active(
}
}
-void ED_node_post_apply_transform(bContext *UNUSED(C), bNodeTree *UNUSED(ntree))
+void ED_node_post_apply_transform(bContext * /*C*/, bNodeTree * /*ntree*/)
{
/* XXX This does not work due to layout functions relying on node->block,
* which only exists during actual drawing. Can we rely on valid totr rects?
@@ -1481,7 +1481,7 @@ void NODE_OT_duplicate(wmOperatorType *ot)
/* XXX: some code needing updating to operators. */
/* goes over all scenes, reads render layers */
-static int node_read_viewlayers_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_read_viewlayers_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
SpaceNode *snode = CTX_wm_space_node(C);
@@ -1529,7 +1529,7 @@ void NODE_OT_read_viewlayers(wmOperatorType *ot)
ot->flag = 0;
}
-int node_render_changed_exec(bContext *C, wmOperator *UNUSED(op))
+int node_render_changed_exec(bContext *C, wmOperator * /*op*/)
{
Scene *sce = CTX_data_scene(C);
@@ -1636,7 +1636,7 @@ static void node_flag_toggle_exec(SpaceNode *snode, int toggle_flag)
}
}
-static int node_hide_toggle_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_hide_toggle_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -1667,7 +1667,7 @@ void NODE_OT_hide_toggle(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int node_preview_toggle_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_preview_toggle_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -1700,7 +1700,7 @@ void NODE_OT_preview_toggle(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int node_deactivate_viewer_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_deactivate_viewer_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode &snode = *CTX_wm_space_node(C);
WorkSpace &workspace = *CTX_wm_workspace(C);
@@ -1740,7 +1740,7 @@ void NODE_OT_deactivate_viewer(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int node_options_toggle_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_options_toggle_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -1771,7 +1771,7 @@ void NODE_OT_options_toggle(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int node_socket_toggle_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_socket_toggle_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -1827,7 +1827,7 @@ void NODE_OT_hide_socket_toggle(wmOperatorType *ot)
/** \name Node Mute Operator
* \{ */
-static int node_mute_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_mute_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
SpaceNode *snode = CTX_wm_space_node(C);
@@ -1867,7 +1867,7 @@ void NODE_OT_mute_toggle(wmOperatorType *ot)
/** \name Node Delete Operator
* \{ */
-static int node_delete_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_delete_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
SpaceNode *snode = CTX_wm_space_node(C);
@@ -1917,7 +1917,7 @@ static bool node_switch_view_poll(bContext *C)
return false;
}
-static int node_switch_view_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_switch_view_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -1954,7 +1954,7 @@ void NODE_OT_switch_view_update(wmOperatorType *ot)
/** \name Node Delete with Reconnect Operator
* \{ */
-static int node_delete_reconnect_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_delete_reconnect_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
SpaceNode *snode = CTX_wm_space_node(C);
@@ -2048,7 +2048,7 @@ void NODE_OT_output_file_add_socket(wmOperatorType *ot)
/** \name Node Multi File Output Remove Socket Operator
* \{ */
-static int node_output_file_remove_active_socket_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_output_file_remove_active_socket_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
PointerRNA ptr = CTX_data_pointer_get(C, "node");
@@ -2174,7 +2174,7 @@ void NODE_OT_output_file_move_active_socket(wmOperatorType *ot)
/** \name Node Copy Node Color Operator
* \{ */
-static int node_copy_color_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_copy_color_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode &snode = *CTX_wm_space_node(C);
bNodeTree &ntree = *snode.edittree;
@@ -2222,7 +2222,7 @@ void NODE_OT_node_copy_color(wmOperatorType *ot)
/** \name Node Copy to Clipboard Operator
* \{ */
-static int node_clipboard_copy_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_clipboard_copy_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
bNodeTree *ntree = snode->edittree;
@@ -2615,8 +2615,8 @@ static bool socket_change_poll_type(void *userdata, bNodeSocketType *socket_type
}
static const EnumPropertyItem *socket_change_type_itemf(bContext *C,
- PointerRNA *UNUSED(ptr),
- PropertyRNA *UNUSED(prop),
+ PointerRNA * /*ptr*/,
+ PropertyRNA * /*prop*/,
bool *r_free)
{
if (!C) {
@@ -2980,7 +2980,7 @@ void NODE_OT_viewer_border(wmOperatorType *ot)
WM_operator_properties_gesture_box(ot);
}
-static int clear_viewer_border_exec(bContext *C, wmOperator *UNUSED(op))
+static int clear_viewer_border_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
bNodeTree *btree = snode->nodetree;
@@ -3013,7 +3013,7 @@ void NODE_OT_clear_viewer_border(wmOperatorType *ot)
/** \name Cryptomatte Add Socket
* \{ */
-static int node_cryptomatte_add_socket_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_cryptomatte_add_socket_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
PointerRNA ptr = CTX_data_pointer_get(C, "node");
@@ -3061,7 +3061,7 @@ void NODE_OT_cryptomatte_layer_add(wmOperatorType *ot)
/** \name Cryptomatte Remove Socket
* \{ */
-static int node_cryptomatte_remove_socket_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_cryptomatte_remove_socket_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
PointerRNA ptr = CTX_data_pointer_get(C, "node");
diff --git a/source/blender/editors/space_node/node_geometry_attribute_search.cc b/source/blender/editors/space_node/node_geometry_attribute_search.cc
index 809c4b2fe59..a1a8fd0dfdc 100644
--- a/source/blender/editors/space_node/node_geometry_attribute_search.cc
+++ b/source/blender/editors/space_node/node_geometry_attribute_search.cc
@@ -213,7 +213,7 @@ static void attribute_search_exec_fn(bContext *C, void *data_v, void *item_v)
ED_undo_push(C, "Assign Attribute Name");
}
-void node_geometry_add_attribute_search_button(const bContext &UNUSED(C),
+void node_geometry_add_attribute_search_button(const bContext & /*C*/,
const bNode &node,
PointerRNA &socket_ptr,
uiLayout &layout)
diff --git a/source/blender/editors/space_node/node_gizmo.cc b/source/blender/editors/space_node/node_gizmo.cc
index a6c9538d782..7a77d523f43 100644
--- a/source/blender/editors/space_node/node_gizmo.cc
+++ b/source/blender/editors/space_node/node_gizmo.cc
@@ -65,7 +65,7 @@ static void node_gizmo_calc_matrix_space_with_image_dims(const SpaceNode *snode,
/** \name Backdrop Gizmo
* \{ */
-static void gizmo_node_backdrop_prop_matrix_get(const wmGizmo *UNUSED(gz),
+static void gizmo_node_backdrop_prop_matrix_get(const wmGizmo * /*gz*/,
wmGizmoProperty *gz_prop,
void *value_p)
{
@@ -78,7 +78,7 @@ static void gizmo_node_backdrop_prop_matrix_get(const wmGizmo *UNUSED(gz),
matrix[3][1] = snode->yof;
}
-static void gizmo_node_backdrop_prop_matrix_set(const wmGizmo *UNUSED(gz),
+static void gizmo_node_backdrop_prop_matrix_set(const wmGizmo * /*gz*/,
wmGizmoProperty *gz_prop,
const void *value_p)
{
@@ -90,7 +90,7 @@ static void gizmo_node_backdrop_prop_matrix_set(const wmGizmo *UNUSED(gz),
snode->yof = matrix[3][1];
}
-static bool WIDGETGROUP_node_transform_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
+static bool WIDGETGROUP_node_transform_poll(const bContext *C, wmGizmoGroupType * /*gzgt*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -109,7 +109,7 @@ static bool WIDGETGROUP_node_transform_poll(const bContext *C, wmGizmoGroupType
return false;
}
-static void WIDGETGROUP_node_transform_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
+static void WIDGETGROUP_node_transform_setup(const bContext * /*C*/, wmGizmoGroup *gzgroup)
{
wmGizmoWrapper *wwrapper = (wmGizmoWrapper *)MEM_mallocN(sizeof(wmGizmoWrapper), __func__);
@@ -294,7 +294,7 @@ static void gizmo_node_crop_prop_matrix_set(const wmGizmo *gz,
gizmo_node_crop_update(crop_group);
}
-static bool WIDGETGROUP_node_crop_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
+static bool WIDGETGROUP_node_crop_poll(const bContext *C, wmGizmoGroupType * /*gzgt*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -316,7 +316,7 @@ static bool WIDGETGROUP_node_crop_poll(const bContext *C, wmGizmoGroupType *UNUS
return false;
}
-static void WIDGETGROUP_node_crop_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
+static void WIDGETGROUP_node_crop_setup(const bContext * /*C*/, wmGizmoGroup *gzgroup)
{
NodeCropWidgetGroup *crop_group = MEM_new<NodeCropWidgetGroup>(__func__);
crop_group->border = WM_gizmo_new("GIZMO_GT_cage_2d", gzgroup, nullptr);
@@ -406,7 +406,7 @@ struct NodeSunBeamsWidgetGroup {
} state;
};
-static bool WIDGETGROUP_node_sbeam_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
+static bool WIDGETGROUP_node_sbeam_poll(const bContext *C, wmGizmoGroupType * /*gzgt*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -425,7 +425,7 @@ static bool WIDGETGROUP_node_sbeam_poll(const bContext *C, wmGizmoGroupType *UNU
return false;
}
-static void WIDGETGROUP_node_sbeam_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
+static void WIDGETGROUP_node_sbeam_setup(const bContext * /*C*/, wmGizmoGroup *gzgroup)
{
NodeSunBeamsWidgetGroup *sbeam_group = (NodeSunBeamsWidgetGroup *)MEM_mallocN(
sizeof(NodeSunBeamsWidgetGroup), __func__);
@@ -511,7 +511,7 @@ struct NodeCornerPinWidgetGroup {
} state;
};
-static bool WIDGETGROUP_node_corner_pin_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
+static bool WIDGETGROUP_node_corner_pin_poll(const bContext *C, wmGizmoGroupType * /*gzgt*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -530,7 +530,7 @@ static bool WIDGETGROUP_node_corner_pin_poll(const bContext *C, wmGizmoGroupType
return false;
}
-static void WIDGETGROUP_node_corner_pin_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
+static void WIDGETGROUP_node_corner_pin_setup(const bContext * /*C*/, wmGizmoGroup *gzgroup)
{
NodeCornerPinWidgetGroup *cpin_group = (NodeCornerPinWidgetGroup *)MEM_mallocN(
sizeof(NodeCornerPinWidgetGroup), __func__);
diff --git a/source/blender/editors/space_node/node_group.cc b/source/blender/editors/space_node/node_group.cc
index e0de5e2f71d..7de02f5d6b8 100644
--- a/source/blender/editors/space_node/node_group.cc
+++ b/source/blender/editors/space_node/node_group.cc
@@ -603,9 +603,7 @@ static int node_group_separate_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int node_group_separate_invoke(bContext *C,
- wmOperator *UNUSED(op),
- const wmEvent *UNUSED(event))
+static int node_group_separate_invoke(bContext *C, wmOperator * /*op*/, const wmEvent * /*event*/)
{
uiPopupMenu *pup = UI_popup_menu_begin(
C, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Separate"), ICON_NONE);
diff --git a/source/blender/editors/space_node/node_relationships.cc b/source/blender/editors/space_node/node_relationships.cc
index d9f87433c53..7cf18e2f828 100644
--- a/source/blender/editors/space_node/node_relationships.cc
+++ b/source/blender/editors/space_node/node_relationships.cc
@@ -170,7 +170,7 @@ static void pick_input_link_by_link_intersect(const bContext &C,
}
}
-static bool socket_is_available(bNodeTree *UNUSED(ntree), bNodeSocket *sock, const bool allow_used)
+static bool socket_is_available(bNodeTree * /*ntree*/, bNodeSocket *sock, const bool allow_used)
{
if (nodeSocketIsHidden(sock)) {
return false;
@@ -699,7 +699,7 @@ static int node_link_viewer(const bContext &C, bNode &bnode_to_view, bNodeSocket
/** \name Link to Viewer Node Operator
* \{ */
-static int node_active_link_viewer_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_active_link_viewer_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode &snode = *CTX_wm_space_node(C);
bNode *node = nodeGetActive(snode.edittree);
@@ -805,7 +805,7 @@ static bool should_create_drag_link_search_menu(const bNodeTree &node_tree,
return true;
}
-static void draw_draglink_tooltip(const bContext *UNUSED(C), ARegion *UNUSED(region), void *arg)
+static void draw_draglink_tooltip(const bContext * /*C*/, ARegion * /*region*/, void *arg)
{
bNodeLinkDrag *nldrag = static_cast<bNodeLinkDrag *>(arg);
@@ -834,7 +834,7 @@ static void draw_draglink_tooltip_deactivate(const ARegion &region, bNodeLinkDra
}
}
-static void node_link_update_header(bContext *C, bNodeLinkDrag *UNUSED(nldrag))
+static void node_link_update_header(bContext *C, bNodeLinkDrag * /*nldrag*/)
{
char header[UI_MAX_DRAW_STR];
@@ -1549,7 +1549,7 @@ void NODE_OT_links_mute(wmOperatorType *ot)
/** \name Detach Links Operator
* \{ */
-static int detach_links_exec(bContext *C, wmOperator *UNUSED(op))
+static int detach_links_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode &snode = *CTX_wm_space_node(C);
bNodeTree &ntree = *snode.edittree;
@@ -1586,7 +1586,7 @@ void NODE_OT_links_detach(wmOperatorType *ot)
/** \name Set Parent Operator
* \{ */
-static int node_parent_set_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_parent_set_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode &snode = *CTX_wm_space_node(C);
bNodeTree &ntree = *snode.edittree;
@@ -1668,7 +1668,7 @@ static void node_join_attach_recursive(bNode *node,
}
}
-static int node_join_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_join_exec(bContext *C, wmOperator * /*op*/)
{
Main &bmain = *CTX_data_main(C);
SpaceNode &snode = *CTX_wm_space_node(C);
@@ -1738,7 +1738,7 @@ static bNode *node_find_frame_to_attach(ARegion &region,
return nullptr;
}
-static int node_attach_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
+static int node_attach_invoke(bContext *C, wmOperator * /*op*/, const wmEvent *event)
{
ARegion &region = *CTX_wm_region(C);
SpaceNode &snode = *CTX_wm_space_node(C);
@@ -1836,7 +1836,7 @@ static void node_detach_recursive(bNode *node)
}
/* detach the root nodes in the current selection */
-static int node_detach_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_detach_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode &snode = *CTX_wm_space_node(C);
bNodeTree &ntree = *snode.edittree;
@@ -2104,7 +2104,7 @@ static bNodeSocket *get_main_socket(bNodeTree &ntree, bNode &node, eNodeSocketIn
return nullptr;
}
-static bool node_parents_offset_flag_enable_cb(bNode *parent, void *UNUSED(userdata))
+static bool node_parents_offset_flag_enable_cb(bNode *parent, void * /*userdata*/)
{
/* NODE_TEST is used to flag nodes that shouldn't be offset (again) */
parent->flag |= NODE_TEST;
diff --git a/source/blender/editors/space_node/node_select.cc b/source/blender/editors/space_node/node_select.cc
index c11ae323115..7c39169415b 100644
--- a/source/blender/editors/space_node/node_select.cc
+++ b/source/blender/editors/space_node/node_select.cc
@@ -1134,7 +1134,7 @@ void NODE_OT_select_all(wmOperatorType *ot)
/** \name Select Linked To Operator
* \{ */
-static int node_select_linked_to_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_select_linked_to_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode &snode = *CTX_wm_space_node(C);
bNodeTree &node_tree = *snode.edittree;
@@ -1184,7 +1184,7 @@ void NODE_OT_select_linked_to(wmOperatorType *ot)
/** \name Select Linked From Operator
* \{ */
-static int node_select_linked_from_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_select_linked_from_exec(bContext *C, wmOperator * /*op*/)
{
SpaceNode &snode = *CTX_wm_space_node(C);
bNodeTree &node_tree = *snode.edittree;
@@ -1352,10 +1352,10 @@ static void node_find_create_label(const bNode *node, char *str, int maxlen)
/* Generic search invoke. */
static void node_find_update_fn(const bContext *C,
- void *UNUSED(arg),
+ void * /*arg*/,
const char *str,
uiSearchItems *items,
- const bool UNUSED(is_first))
+ const bool /*is_first*/)
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -1383,7 +1383,7 @@ static void node_find_update_fn(const bContext *C,
BLI_string_search_free(search);
}
-static void node_find_exec_fn(bContext *C, void *UNUSED(arg1), void *arg2)
+static void node_find_exec_fn(bContext *C, void * /*arg1*/, void *arg2)
{
SpaceNode *snode = CTX_wm_space_node(C);
bNode *active = (bNode *)arg2;
@@ -1450,7 +1450,7 @@ static uiBlock *node_find_menu(bContext *C, ARegion *region, void *arg_op)
return block;
}
-static int node_find_node_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int node_find_node_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
UI_popup_block_invoke(C, node_find_menu, op, nullptr);
return OPERATOR_CANCELLED;
diff --git a/source/blender/editors/space_node/node_templates.cc b/source/blender/editors/space_node/node_templates.cc
index 5fc194e02a4..1b7eadd336a 100644
--- a/source/blender/editors/space_node/node_templates.cc
+++ b/source/blender/editors/space_node/node_templates.cc
@@ -494,7 +494,7 @@ static int ui_node_item_name_compare(const void *a, const void *b)
return BLI_strcasecmp_natural(type_a->ui_name, type_b->ui_name);
}
-static bool ui_node_item_special_poll(const bNodeTree *UNUSED(ntree), const bNodeType *ntype)
+static bool ui_node_item_special_poll(const bNodeTree * /*ntree*/, const bNodeType *ntype)
{
if (STREQ(ntype->idname, "ShaderNodeUVAlongStroke")) {
/* TODO(sergey): Currently we don't have Freestyle nodes edited from
diff --git a/source/blender/editors/space_node/node_view.cc b/source/blender/editors/space_node/node_view.cc
index 2c02e3c6ecc..f9b019e12ea 100644
--- a/source/blender/editors/space_node/node_view.cc
+++ b/source/blender/editors/space_node/node_view.cc
@@ -273,7 +273,7 @@ static int snode_bg_viewmove_invoke(bContext *C, wmOperator *op, const wmEvent *
return OPERATOR_RUNNING_MODAL;
}
-static void snode_bg_viewmove_cancel(bContext *UNUSED(C), wmOperator *op)
+static void snode_bg_viewmove_cancel(bContext * /*C*/, wmOperator *op)
{
MEM_freeN(op->customdata);
op->customdata = nullptr;
@@ -341,7 +341,7 @@ void NODE_OT_backimage_zoom(wmOperatorType *ot)
/** \name Background Image Fit
* \{ */
-static int backimage_fit_exec(bContext *C, wmOperator *UNUSED(op))
+static int backimage_fit_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
SpaceNode *snode = CTX_wm_space_node(C);
diff --git a/source/blender/editors/space_node/space_node.cc b/source/blender/editors/space_node/space_node.cc
index 3e5cbf88e15..47d117ea81f 100644
--- a/source/blender/editors/space_node/space_node.cc
+++ b/source/blender/editors/space_node/space_node.cc
@@ -219,7 +219,7 @@ float2 space_node_group_offset(const SpaceNode &snode)
/* ******************** default callbacks for node space ***************** */
-static SpaceLink *node_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene))
+static SpaceLink *node_create(const ScrArea * /*area*/, const Scene * /*scene*/)
{
SpaceNode *snode = MEM_cnew<SpaceNode>("initnode");
snode->spacetype = SPACE_NODE;
@@ -305,7 +305,7 @@ static void node_free(SpaceLink *sl)
}
/* spacetype; init callback */
-static void node_init(wmWindowManager *UNUSED(wm), ScrArea *area)
+static void node_init(wmWindowManager * /*wm*/, ScrArea *area)
{
SpaceNode *snode = (SpaceNode *)area->spacedata.first;
@@ -640,24 +640,22 @@ static void node_main_region_draw(const bContext *C, ARegion *region)
/* ************* dropboxes ************* */
-static bool node_group_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool node_group_drop_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
{
return WM_drag_is_ID_type(drag, ID_NT);
}
-static bool node_object_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool node_object_drop_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
{
return WM_drag_is_ID_type(drag, ID_OB);
}
-static bool node_collection_drop_poll(bContext *UNUSED(C),
- wmDrag *drag,
- const wmEvent *UNUSED(event))
+static bool node_collection_drop_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
{
return WM_drag_is_ID_type(drag, ID_GR);
}
-static bool node_ima_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool node_ima_drop_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
{
if (drag->type == WM_DRAG_PATH) {
/* rule might not work? */
@@ -666,26 +664,26 @@ static bool node_ima_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent
return WM_drag_is_ID_type(drag, ID_IM);
}
-static bool node_mask_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool node_mask_drop_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
{
return WM_drag_is_ID_type(drag, ID_MSK);
}
-static void node_group_drop_copy(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
+static void node_group_drop_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
{
ID *id = WM_drag_get_local_ID_or_import_from_asset(drag, 0);
RNA_int_set(drop->ptr, "session_uuid", int(id->session_uuid));
}
-static void node_id_drop_copy(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
+static void node_id_drop_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
{
ID *id = WM_drag_get_local_ID_or_import_from_asset(drag, 0);
RNA_int_set(drop->ptr, "session_uuid", int(id->session_uuid));
}
-static void node_id_path_drop_copy(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
+static void node_id_path_drop_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
{
ID *id = WM_drag_get_local_ID_or_import_from_asset(drag, 0);
@@ -739,7 +737,7 @@ static void node_dropboxes()
/* ************* end drop *********** */
/* add handlers, stuff you only do once or on area/region changes */
-static void node_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
+static void node_header_region_init(wmWindowManager * /*wm*/, ARegion *region)
{
ED_region_header_init(region);
}
@@ -979,7 +977,7 @@ static void node_id_remap_cb(ID *old_id, ID *new_id, void *user_data)
}
}
-static void node_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, const IDRemapper *mappings)
+static void node_id_remap(ScrArea * /*area*/, SpaceLink *slink, const IDRemapper *mappings)
{
/* Although we should be able to perform all the mappings in a single go this lead to issues when
* running the python test cases. Somehow the nodetree/edittree weren't updated to the new
diff --git a/source/blender/editors/space_outliner/outliner_collections.cc b/source/blender/editors/space_outliner/outliner_collections.cc
index 48e7aa381ef..f76727bff7c 100644
--- a/source/blender/editors/space_outliner/outliner_collections.cc
+++ b/source/blender/editors/space_outliner/outliner_collections.cc
@@ -755,7 +755,7 @@ void OUTLINER_OT_collection_link(wmOperatorType *ot)
/** \name Instance Collection
* \{ */
-static int collection_instance_exec(bContext *C, wmOperator *UNUSED(op))
+static int collection_instance_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
@@ -1502,7 +1502,7 @@ static TreeTraversalAction outliner_hide_collect_data_to_edit(TreeElement *te, v
return TRAVERSE_CONTINUE;
}
-static int outliner_hide_exec(bContext *C, wmOperator *UNUSED(op))
+static int outliner_hide_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1558,7 +1558,7 @@ void OUTLINER_OT_hide(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int outliner_unhide_all_exec(bContext *C, wmOperator *UNUSED(op))
+static int outliner_unhide_all_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.cc b/source/blender/editors/space_outliner/outliner_dragdrop.cc
index 758928fed8e..20e3eb0009d 100644
--- a/source/blender/editors/space_outliner/outliner_dragdrop.cc
+++ b/source/blender/editors/space_outliner/outliner_dragdrop.cc
@@ -500,7 +500,7 @@ static bool parent_clear_poll(bContext *C, wmDrag *drag, const wmEvent *event)
}
}
-static int parent_clear_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
+static int parent_clear_invoke(bContext *C, wmOperator * /*op*/, const wmEvent *event)
{
Main *bmain = CTX_data_main(C);
@@ -555,7 +555,7 @@ static bool scene_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
return (ob && (outliner_ID_drop_find(C, event, ID_SCE) != nullptr));
}
-static int scene_drop_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
+static int scene_drop_invoke(bContext *C, wmOperator * /*op*/, const wmEvent *event)
{
Main *bmain = CTX_data_main(C);
Scene *scene = (Scene *)outliner_ID_drop_find(C, event, ID_SCE);
@@ -625,7 +625,7 @@ static bool material_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
return (ma && (outliner_ID_drop_find(C, event, ID_OB) != nullptr));
}
-static int material_drop_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
+static int material_drop_invoke(bContext *C, wmOperator * /*op*/, const wmEvent *event)
{
Main *bmain = CTX_data_main(C);
Object *ob = (Object *)outliner_ID_drop_find(C, event, ID_OB);
@@ -886,10 +886,10 @@ static bool datastack_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
return true;
}
-static char *datastack_drop_tooltip(bContext *UNUSED(C),
+static char *datastack_drop_tooltip(bContext * /*C*/,
wmDrag *drag,
const int UNUSED(xy[2]),
- struct wmDropBox *UNUSED(drop))
+ struct wmDropBox * /*drop*/)
{
StackDropData *drop_data = static_cast<StackDropData *>(drag->poin);
switch (drop_data->drop_action) {
@@ -1224,7 +1224,7 @@ static bool collection_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event
static char *collection_drop_tooltip(bContext *C,
wmDrag *drag,
const int xy[2],
- wmDropBox *UNUSED(drop))
+ wmDropBox * /*drop*/)
{
wmWindow *win = CTX_wm_window(C);
const wmEvent *event = win ? win->eventstate : nullptr;
@@ -1290,7 +1290,7 @@ static char *collection_drop_tooltip(bContext *C,
return nullptr;
}
-static int collection_drop_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
+static int collection_drop_invoke(bContext *C, wmOperator * /*op*/, const wmEvent *event)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
@@ -1404,9 +1404,7 @@ static TreeElement *outliner_item_drag_element_find(SpaceOutliner *space_outline
return outliner_find_item_at_y(space_outliner, &space_outliner->tree, my);
}
-static int outliner_item_drag_drop_invoke(bContext *C,
- wmOperator *UNUSED(op),
- const wmEvent *event)
+static int outliner_item_drag_drop_invoke(bContext *C, wmOperator * /*op*/, const wmEvent *event)
{
ARegion *region = CTX_wm_region(C);
SpaceOutliner *space_outliner = CTX_wm_space_outliner(C);
diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc
index 64aaf00344b..acfbb7a8ae4 100644
--- a/source/blender/editors/space_outliner/outliner_draw.cc
+++ b/source/blender/editors/space_outliner/outliner_draw.cc
@@ -166,12 +166,12 @@ static void restrictbutton_recursive_bone(Bone *bone_parent, int flag, bool set_
}
}
-static void restrictbutton_r_lay_fn(bContext *C, void *poin, void *UNUSED(poin2))
+static void restrictbutton_r_lay_fn(bContext *C, void *poin, void * /*poin2*/)
{
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, poin);
}
-static void restrictbutton_bone_visibility_fn(bContext *C, void *poin, void *UNUSED(poin2))
+static void restrictbutton_bone_visibility_fn(bContext *C, void *poin, void * /*poin2*/)
{
Bone *bone = (Bone *)poin;
@@ -180,7 +180,7 @@ static void restrictbutton_bone_visibility_fn(bContext *C, void *poin, void *UNU
}
}
-static void restrictbutton_bone_select_fn(bContext *C, void *UNUSED(poin), void *poin2)
+static void restrictbutton_bone_select_fn(bContext *C, void * /*poin*/, void *poin2)
{
Bone *bone = (Bone *)poin2;
if (bone->flag & BONE_UNSELECTABLE) {
@@ -226,7 +226,7 @@ static void restrictbutton_ebone_visibility_fn(bContext *C, void *poin, void *po
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, nullptr);
}
-static void restrictbutton_gp_layer_flag_fn(bContext *C, void *poin, void *UNUSED(poin2))
+static void restrictbutton_gp_layer_flag_fn(bContext *C, void *poin, void * /*poin2*/)
{
ID *id = (ID *)poin;
@@ -234,7 +234,7 @@ static void restrictbutton_gp_layer_flag_fn(bContext *C, void *poin, void *UNUSE
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, nullptr);
}
-static void restrictbutton_id_user_toggle(bContext *UNUSED(C), void *poin, void *UNUSED(poin2))
+static void restrictbutton_id_user_toggle(bContext * /*C*/, void *poin, void * /*poin2*/)
{
ID *id = (ID *)poin;
@@ -2108,7 +2108,7 @@ static void outliner_buttons(const bContext *C,
}
}
-static void outliner_mode_toggle_fn(bContext *C, void *tselem_poin, void *UNUSED(arg2))
+static void outliner_mode_toggle_fn(bContext *C, void *tselem_poin, void * /*arg2*/)
{
SpaceOutliner *space_outliner = CTX_wm_space_outliner(C);
TreeStoreElem *tselem = (TreeStoreElem *)tselem_poin;
diff --git a/source/blender/editors/space_outliner/outliner_edit.cc b/source/blender/editors/space_outliner/outliner_edit.cc
index 7a66644b5a8..21d44cb5d58 100644
--- a/source/blender/editors/space_outliner/outliner_edit.cc
+++ b/source/blender/editors/space_outliner/outliner_edit.cc
@@ -77,7 +77,7 @@ static void outliner_show_active(SpaceOutliner *space_outliner,
/** \name Highlight on Cursor Motion Operator
* \{ */
-static int outliner_highlight_update(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
+static int outliner_highlight_update(bContext *C, wmOperator * /*op*/, const wmEvent *event)
{
/* stop highlighting if out of area */
if (!ED_screen_area_active(C)) {
@@ -358,11 +358,11 @@ static void do_item_rename(ARegion *region,
void item_rename_fn(bContext *C,
ReportList *reports,
- Scene *UNUSED(scene),
+ Scene * /*scene*/,
TreeElement *te,
- TreeStoreElem *UNUSED(tsep),
+ TreeStoreElem * /*tsep*/,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
ARegion *region = CTX_wm_region(C);
do_item_rename(region, te, tselem, reports);
@@ -501,11 +501,11 @@ static void id_delete_tag(bContext *C, ReportList *reports, TreeElement *te, Tre
void id_delete_tag_fn(bContext *C,
ReportList *reports,
- Scene *UNUSED(scene),
+ Scene * /*scene*/,
TreeElement *te,
- TreeStoreElem *UNUSED(tsep),
+ TreeStoreElem * /*tsep*/,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
id_delete_tag(C, reports, te, tselem);
}
@@ -681,7 +681,7 @@ static int outliner_id_remap_invoke(bContext *C, wmOperator *op, const wmEvent *
static const EnumPropertyItem *outliner_id_itemf(bContext *C,
PointerRNA *ptr,
- PropertyRNA *UNUSED(prop),
+ PropertyRNA * /*prop*/,
bool *r_free)
{
if (C == nullptr) {
@@ -744,12 +744,12 @@ void OUTLINER_OT_id_remap(wmOperatorType *ot)
}
void id_remap_fn(bContext *C,
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
- TreeElement *UNUSED(te),
- TreeStoreElem *UNUSED(tsep),
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
+ TreeElement * /*te*/,
+ TreeStoreElem * /*tsep*/,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
wmOperatorType *ot = WM_operatortype_find("OUTLINER_OT_id_remap", false);
PointerRNA op_props;
@@ -985,12 +985,12 @@ void OUTLINER_OT_lib_relocate(wmOperatorType *ot)
}
void lib_relocate_fn(bContext *C,
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
TreeElement *te,
- TreeStoreElem *UNUSED(tsep),
+ TreeStoreElem * /*tsep*/,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
/* XXX: This does not work with several items
* (it is only called once in the end, due to the 'deferred'
@@ -1042,12 +1042,12 @@ void OUTLINER_OT_lib_reload(wmOperatorType *ot)
}
void lib_reload_fn(bContext *C,
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
TreeElement *te,
- TreeStoreElem *UNUSED(tsep),
+ TreeStoreElem * /*tsep*/,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
wmOperatorType *ot = WM_operatortype_find("WM_OT_lib_reload", false);
@@ -1139,7 +1139,7 @@ bool outliner_flag_flip(const ListBase &lb, const short flag)
/** \name Toggle Expanded (Outliner) Operator
* \{ */
-static int outliner_toggle_expanded_exec(bContext *C, wmOperator *UNUSED(op))
+static int outliner_toggle_expanded_exec(bContext *C, wmOperator * /*op*/)
{
SpaceOutliner *space_outliner = CTX_wm_space_outliner(C);
ARegion *region = CTX_wm_region(C);
@@ -1316,7 +1316,7 @@ static void outliner_show_active(SpaceOutliner *space_outliner,
}
}
-static int outliner_show_active_exec(bContext *C, wmOperator *UNUSED(op))
+static int outliner_show_active_exec(bContext *C, wmOperator * /*op*/)
{
SpaceOutliner *space_outliner = CTX_wm_space_outliner(C);
const Scene *scene = CTX_data_scene(C);
@@ -1545,7 +1545,7 @@ static void tree_element_show_hierarchy(Scene *scene, SpaceOutliner *space_outli
}
/* show entire object level hierarchy */
-static int outliner_show_hierarchy_exec(bContext *C, wmOperator *UNUSED(op))
+static int outliner_show_hierarchy_exec(bContext *C, wmOperator * /*op*/)
{
SpaceOutliner *space_outliner = CTX_wm_space_outliner(C);
ARegion *region = CTX_wm_region(C);
@@ -1602,7 +1602,7 @@ static void tree_element_to_path(TreeElement *te,
char **path,
int *array_index,
short *flag,
- short *UNUSED(groupmode))
+ short * /*groupmode*/)
{
ListBase hierarchy = {nullptr, nullptr};
char *newpath = nullptr;
@@ -2057,7 +2057,7 @@ void OUTLINER_OT_keyingset_add_selected(wmOperatorType *ot)
/** \name Keying-Set Remove Operator
* \{ */
-static int outliner_keyingset_removeitems_exec(bContext *C, wmOperator *UNUSED(op))
+static int outliner_keyingset_removeitems_exec(bContext *C, wmOperator * /*op*/)
{
SpaceOutliner *space_outliner = CTX_wm_space_outliner(C);
Scene *scene = CTX_data_scene(C);
@@ -2108,7 +2108,7 @@ static bool ed_operator_outliner_id_orphans_active(bContext *C)
return true;
}
-static int outliner_orphans_purge_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int outliner_orphans_purge_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
Main *bmain = CTX_data_main(C);
int num_tagged[INDEX_ID_MAX] = {0};
diff --git a/source/blender/editors/space_outliner/outliner_select.cc b/source/blender/editors/space_outliner/outliner_select.cc
index 6f8677e8370..20319a8befe 100644
--- a/source/blender/editors/space_outliner/outliner_select.cc
+++ b/source/blender/editors/space_outliner/outliner_select.cc
@@ -713,7 +713,7 @@ static void tree_element_sequence_activate(bContext *C,
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene);
}
-static void tree_element_sequence_dup_activate(Scene *scene, TreeElement *UNUSED(te))
+static void tree_element_sequence_dup_activate(Scene *scene, TreeElement * /*te*/)
{
Editing *ed = SEQ_editing_get(scene);
@@ -2017,7 +2017,7 @@ static void outliner_walk_scroll(SpaceOutliner *space_outliner, ARegion *region,
}
}
-static int outliner_walk_select_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int outliner_walk_select_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
SpaceOutliner *space_outliner = CTX_wm_space_outliner(C);
ARegion *region = CTX_wm_region(C);
diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc
index 69ab9a2950e..2ece9ecc7f2 100644
--- a/source/blender/editors/space_outliner/outliner_tools.cc
+++ b/source/blender/editors/space_outliner/outliner_tools.cc
@@ -215,25 +215,25 @@ static bool outliner_operation_tree_element_poll(bContext *C)
}
static void unlink_action_fn(bContext *C,
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
- TreeElement *UNUSED(te),
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
+ TreeElement * /*te*/,
TreeStoreElem *tsep,
- TreeStoreElem *UNUSED(tselem),
- void *UNUSED(user_data))
+ TreeStoreElem * /*tselem*/,
+ void * /*user_data*/)
{
/* just set action to nullptr */
BKE_animdata_set_action(CTX_wm_reports(C), tsep->id, nullptr);
DEG_id_tag_update(tsep->id, ID_RECALC_ANIMATION);
}
-static void unlink_material_fn(bContext *UNUSED(C),
+static void unlink_material_fn(bContext * /*C*/,
ReportList *reports,
- Scene *UNUSED(scene),
+ Scene * /*scene*/,
TreeElement *te,
TreeStoreElem *tsep,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
const bool te_is_material = TSE_IS_REAL_ID(tselem) && (GS(tselem->id->name) == ID_MA);
@@ -315,13 +315,13 @@ static void unlink_material_fn(bContext *UNUSED(C),
}
}
-static void unlink_texture_fn(bContext *UNUSED(C),
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
+static void unlink_texture_fn(bContext * /*C*/,
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
TreeElement *te,
TreeStoreElem *tsep,
- TreeStoreElem *UNUSED(tselem),
- void *UNUSED(user_data))
+ TreeStoreElem * /*tselem*/,
+ void * /*user_data*/)
{
MTex **mtex = nullptr;
int a;
@@ -345,12 +345,12 @@ static void unlink_texture_fn(bContext *UNUSED(C),
}
static void unlink_collection_fn(bContext *C,
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
- TreeElement *UNUSED(te),
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
+ TreeElement * /*te*/,
TreeStoreElem *tsep,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
Main *bmain = CTX_data_main(C);
Collection *collection = (Collection *)tselem->id;
@@ -381,12 +381,12 @@ static void unlink_collection_fn(bContext *C,
}
static void unlink_object_fn(bContext *C,
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
TreeElement *te,
TreeStoreElem *tsep,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
if (tsep && tsep->id) {
Main *bmain = CTX_data_main(C);
@@ -419,13 +419,13 @@ static void unlink_object_fn(bContext *C,
}
}
-static void unlink_world_fn(bContext *UNUSED(C),
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
- TreeElement *UNUSED(te),
+static void unlink_world_fn(bContext * /*C*/,
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
+ TreeElement * /*te*/,
TreeStoreElem *tsep,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
Scene *parscene = (Scene *)tsep->id;
World *wo = (World *)tselem->id;
@@ -584,7 +584,7 @@ static bool outliner_do_scene_operation(
static bool scene_fn(bContext *C,
eOutliner_PropSceneOps event,
- TreeElement *UNUSED(te),
+ TreeElement * /*te*/,
TreeStoreElem *tselem)
{
Scene *scene = (Scene *)tselem->id;
@@ -684,11 +684,11 @@ static void merged_element_search_fn_recursive(
}
/* Get a list of elements that match the search string */
-static void merged_element_search_update_fn(const bContext *UNUSED(C),
+static void merged_element_search_update_fn(const bContext * /*C*/,
void *data,
const char *str,
uiSearchItems *items,
- const bool UNUSED(is_first))
+ const bool /*is_first*/)
{
MergedSearchData *search_data = (MergedSearchData *)data;
TreeElement *parent = search_data->parent_element;
@@ -700,7 +700,7 @@ static void merged_element_search_update_fn(const bContext *UNUSED(C),
}
/* Activate an element from the merged element search menu */
-static void merged_element_search_exec_fn(struct bContext *C, void *UNUSED(arg1), void *element)
+static void merged_element_search_exec_fn(struct bContext *C, void * /*arg1*/, void *element)
{
SpaceOutliner *space_outliner = CTX_wm_space_outliner(C);
TreeElement *te = (TreeElement *)element;
@@ -775,12 +775,12 @@ void merged_element_search_menu_invoke(bContext *C,
}
static void object_select_fn(bContext *C,
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
- TreeElement *UNUSED(te),
- TreeStoreElem *UNUSED(tsep),
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
+ TreeElement * /*te*/,
+ TreeStoreElem * /*tsep*/,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
const Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -800,12 +800,12 @@ static void object_select_fn(bContext *C,
* \{ */
static void object_select_hierarchy_fn(bContext *C,
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
TreeElement *te,
- TreeStoreElem *UNUSED(tsep),
- TreeStoreElem *UNUSED(tselem),
- void *UNUSED(user_data))
+ TreeStoreElem * /*tsep*/,
+ TreeStoreElem * /*tselem*/,
+ void * /*user_data*/)
{
/* Don't extend because this toggles, which is nice for Ctrl-Click but not for a menu item.
* it's especially confusing when multiple items are selected since some toggle on/off. */
@@ -815,12 +815,12 @@ static void object_select_hierarchy_fn(bContext *C,
}
static void object_deselect_fn(bContext *C,
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
- TreeElement *UNUSED(te),
- TreeStoreElem *UNUSED(tsep),
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
+ TreeElement * /*te*/,
+ TreeStoreElem * /*tsep*/,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
const Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -862,12 +862,12 @@ static void outliner_object_delete_fn(bContext *C, ReportList *reports, Scene *s
}
static void id_local_fn(bContext *C,
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
- TreeElement *UNUSED(te),
- TreeStoreElem *UNUSED(tsep),
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
+ TreeElement * /*te*/,
+ TreeStoreElem * /*tsep*/,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
if (ID_IS_LINKED(tselem->id) && (tselem->id->tag & LIB_TAG_EXTERN)) {
Main *bmain = CTX_data_main(C);
@@ -960,7 +960,7 @@ struct OutlinerLibOverrideData {
* hierarchy. */
static void id_override_library_create_hierarchy_pre_process_fn(bContext *C,
ReportList *reports,
- Scene *UNUSED(scene),
+ Scene * /*scene*/,
TreeElement *te,
TreeStoreElem *tsep,
TreeStoreElem *tselem,
@@ -1267,10 +1267,10 @@ static void id_override_library_create_hierarchy_process(bContext *C,
}
static void id_override_library_reset_fn(bContext *C,
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
- TreeElement *UNUSED(te),
- TreeStoreElem *UNUSED(tsep),
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
+ TreeElement * /*te*/,
+ TreeStoreElem * /*tsep*/,
TreeStoreElem *tselem,
void *user_data)
{
@@ -1297,10 +1297,10 @@ static void id_override_library_reset_fn(bContext *C,
static void id_override_library_clear_single_fn(bContext *C,
ReportList *reports,
Scene *scene,
- TreeElement *UNUSED(te),
- TreeStoreElem *UNUSED(tsep),
+ TreeElement * /*te*/,
+ TreeStoreElem * /*tsep*/,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
BLI_assert(TSE_IS_REAL_ID(tselem));
Main *bmain = CTX_data_main(C);
@@ -1344,11 +1344,11 @@ static void id_override_library_clear_single_fn(bContext *C,
DEG_id_tag_update(&scene->id, ID_RECALC_BASE_FLAGS | ID_RECALC_COPY_ON_WRITE);
}
-static void id_override_library_resync_fn(bContext *UNUSED(C),
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
- TreeElement *UNUSED(te),
- TreeStoreElem *UNUSED(tsep),
+static void id_override_library_resync_fn(bContext * /*C*/,
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
+ TreeElement * /*te*/,
+ TreeStoreElem * /*tsep*/,
TreeStoreElem *tselem,
void *user_data)
{
@@ -1393,11 +1393,11 @@ static void id_override_library_resync_hierarchy_process(bContext *C,
WM_event_add_notifier(C, NC_WINDOW, nullptr);
}
-static void id_override_library_delete_hierarchy_fn(bContext *UNUSED(C),
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
- TreeElement *UNUSED(te),
- TreeStoreElem *UNUSED(tsep),
+static void id_override_library_delete_hierarchy_fn(bContext * /*C*/,
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
+ TreeElement * /*te*/,
+ TreeStoreElem * /*tsep*/,
TreeStoreElem *tselem,
void *user_data)
{
@@ -1420,7 +1420,7 @@ static void id_override_library_delete_hierarchy_fn(bContext *UNUSED(C),
/* Clear (delete) a hierarchy of library overrides. */
static void id_override_library_delete_hierarchy_process(bContext *C,
- ReportList *UNUSED(reports),
+ ReportList * /*reports*/,
OutlinerLibOverrideData &data)
{
Main *bmain = CTX_data_main(C);
@@ -1430,26 +1430,26 @@ static void id_override_library_delete_hierarchy_process(bContext *C,
}
}
-static void id_fake_user_set_fn(bContext *UNUSED(C),
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
- TreeElement *UNUSED(te),
- TreeStoreElem *UNUSED(tsep),
+static void id_fake_user_set_fn(bContext * /*C*/,
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
+ TreeElement * /*te*/,
+ TreeStoreElem * /*tsep*/,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
ID *id = tselem->id;
id_fake_user_set(id);
}
-static void id_fake_user_clear_fn(bContext *UNUSED(C),
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
- TreeElement *UNUSED(te),
- TreeStoreElem *UNUSED(tsep),
+static void id_fake_user_clear_fn(bContext * /*C*/,
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
+ TreeElement * /*te*/,
+ TreeStoreElem * /*tsep*/,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
ID *id = tselem->id;
@@ -1457,12 +1457,12 @@ static void id_fake_user_clear_fn(bContext *UNUSED(C),
}
static void id_select_linked_fn(bContext *C,
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
- TreeElement *UNUSED(te),
- TreeStoreElem *UNUSED(tsep),
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
+ TreeElement * /*te*/,
+ TreeStoreElem * /*tsep*/,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
ID *id = tselem->id;
@@ -1470,12 +1470,12 @@ static void id_select_linked_fn(bContext *C,
}
static void singleuser_action_fn(bContext *C,
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
TreeElement *te,
TreeStoreElem *tsep,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
/* This callback runs for all selected elements, some of which may not be actions which results
* in a crash. */
@@ -1498,12 +1498,12 @@ static void singleuser_action_fn(bContext *C,
}
static void singleuser_world_fn(bContext *C,
- ReportList *UNUSED(reports),
- Scene *UNUSED(scene),
- TreeElement *UNUSED(te),
+ ReportList * /*reports*/,
+ Scene * /*scene*/,
+ TreeElement * /*te*/,
TreeStoreElem *tsep,
TreeStoreElem *tselem,
- void *UNUSED(user_data))
+ void * /*user_data*/)
{
ID *id = tselem->id;
@@ -1579,29 +1579,29 @@ void outliner_do_object_operation(bContext *C,
/** \name Internal Tagging Utilities
* \{ */
-static void clear_animdata_fn(int UNUSED(event),
- TreeElement *UNUSED(te),
+static void clear_animdata_fn(int /*event*/,
+ TreeElement * /*te*/,
TreeStoreElem *tselem,
- void *UNUSED(arg))
+ void * /*arg*/)
{
BKE_animdata_free(tselem->id, true);
DEG_id_tag_update(tselem->id, ID_RECALC_ANIMATION);
}
-static void unlinkact_animdata_fn(int UNUSED(event),
- TreeElement *UNUSED(te),
+static void unlinkact_animdata_fn(int /*event*/,
+ TreeElement * /*te*/,
TreeStoreElem *tselem,
- void *UNUSED(arg))
+ void * /*arg*/)
{
/* just set action to nullptr */
BKE_animdata_set_action(nullptr, tselem->id, nullptr);
DEG_id_tag_update(tselem->id, ID_RECALC_ANIMATION);
}
-static void cleardrivers_animdata_fn(int UNUSED(event),
- TreeElement *UNUSED(te),
+static void cleardrivers_animdata_fn(int /*event*/,
+ TreeElement * /*te*/,
TreeStoreElem *tselem,
- void *UNUSED(arg))
+ void * /*arg*/)
{
IdAdtTemplate *iat = (IdAdtTemplate *)tselem->id;
@@ -1610,10 +1610,10 @@ static void cleardrivers_animdata_fn(int UNUSED(event),
DEG_id_tag_update(tselem->id, ID_RECALC_ANIMATION);
}
-static void refreshdrivers_animdata_fn(int UNUSED(event),
- TreeElement *UNUSED(te),
+static void refreshdrivers_animdata_fn(int /*event*/,
+ TreeElement * /*te*/,
TreeStoreElem *tselem,
- void *UNUSED(arg))
+ void * /*arg*/)
{
IdAdtTemplate *iat = (IdAdtTemplate *)tselem->id;
@@ -1895,7 +1895,7 @@ enum eOutliner_PropModifierOps {
OL_MODIFIER_OP_DELETE,
};
-static void pchan_fn(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem), void *UNUSED(arg))
+static void pchan_fn(int event, TreeElement *te, TreeStoreElem * /*tselem*/, void * /*arg*/)
{
bPoseChannel *pchan = (bPoseChannel *)te->directdata;
@@ -1914,7 +1914,7 @@ static void pchan_fn(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem),
}
}
-static void bone_fn(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem), void *UNUSED(arg))
+static void bone_fn(int event, TreeElement *te, TreeStoreElem * /*tselem*/, void * /*arg*/)
{
Bone *bone = (Bone *)te->directdata;
@@ -1933,7 +1933,7 @@ static void bone_fn(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem), v
}
}
-static void ebone_fn(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem), void *UNUSED(arg))
+static void ebone_fn(int event, TreeElement *te, TreeStoreElem * /*tselem*/, void * /*arg*/)
{
EditBone *ebone = (EditBone *)te->directdata;
@@ -1952,7 +1952,7 @@ static void ebone_fn(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem),
}
}
-static void sequence_fn(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem), void *scene_ptr)
+static void sequence_fn(int event, TreeElement *te, TreeStoreElem * /*tselem*/, void *scene_ptr)
{
TreeElementSequence *te_seq = tree_element_cast<TreeElementSequence>(te);
Sequence *seq = &te_seq->getSequence();
@@ -1982,8 +1982,8 @@ static void sequence_fn(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem
static void gpencil_layer_fn(int event,
TreeElement *te,
- TreeStoreElem *UNUSED(tselem),
- void *UNUSED(arg))
+ TreeStoreElem * /*tselem*/,
+ void * /*arg*/)
{
bGPDlayer *gpl = (bGPDlayer *)te->directdata;
@@ -2003,7 +2003,7 @@ static void gpencil_layer_fn(int event,
static void data_select_linked_fn(int event,
TreeElement *te,
- TreeStoreElem *UNUSED(tselem),
+ TreeStoreElem * /*tselem*/,
void *C_v)
{
const TreeElementRNAStruct *te_rna_struct = tree_element_cast<TreeElementRNAStruct>(te);
@@ -2022,7 +2022,7 @@ static void data_select_linked_fn(int event,
}
}
-static void constraint_fn(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem), void *C_v)
+static void constraint_fn(int event, TreeElement *te, TreeStoreElem * /*tselem*/, void *C_v)
{
bContext *C = static_cast<bContext *>(C_v);
Main *bmain = CTX_data_main(C);
@@ -2062,7 +2062,7 @@ static void constraint_fn(int event, TreeElement *te, TreeStoreElem *UNUSED(tsel
}
}
-static void modifier_fn(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem), void *Carg)
+static void modifier_fn(int event, TreeElement *te, TreeStoreElem * /*tselem*/, void *Carg)
{
bContext *C = (bContext *)Carg;
Main *bmain = CTX_data_main(C);
@@ -2523,8 +2523,8 @@ static const EnumPropertyItem prop_id_op_types[] = {
};
static bool outliner_id_operation_item_poll(bContext *C,
- PointerRNA *UNUSED(ptr),
- PropertyRNA *UNUSED(prop),
+ PointerRNA * /*ptr*/,
+ PropertyRNA * /*prop*/,
const int enum_value)
{
if (!outliner_operation_tree_element_poll(C)) {
@@ -2891,7 +2891,7 @@ static void outliner_do_id_set_operation(
});
}
-static void actionset_id_fn(TreeElement *UNUSED(te),
+static void actionset_id_fn(TreeElement * /*te*/,
TreeStoreElem *tselem,
TreeStoreElem *tsep,
ID *actId)
@@ -3274,9 +3274,9 @@ static int outliner_data_operation_exec(bContext *C, wmOperator *op)
/* Dynamically populate an enum of Keying Sets */
static const EnumPropertyItem *outliner_data_op_sets_enum_item_fn(bContext *C,
- PointerRNA *UNUSED(ptr),
- PropertyRNA *UNUSED(prop),
- bool *UNUSED(r_free))
+ PointerRNA * /*ptr*/,
+ PropertyRNA * /*prop*/,
+ bool * /*r_free*/)
{
/* Check for invalid states. */
if (C == nullptr) {
@@ -3433,7 +3433,7 @@ static int do_outliner_operation_event(bContext *C,
return OPERATOR_CANCELLED;
}
-static int outliner_operation(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
+static int outliner_operation(bContext *C, wmOperator * /*op*/, const wmEvent *event)
{
ARegion *region = CTX_wm_region(C);
SpaceOutliner *space_outliner = CTX_wm_space_outliner(C);
diff --git a/source/blender/editors/space_outliner/space_outliner.cc b/source/blender/editors/space_outliner/space_outliner.cc
index e20bc0a956a..af2da7fa872 100644
--- a/source/blender/editors/space_outliner/space_outliner.cc
+++ b/source/blender/editors/space_outliner/space_outliner.cc
@@ -92,7 +92,7 @@ static void outliner_main_region_draw(const bContext *C, ARegion *region)
UI_view2d_scrollers_draw(v2d, nullptr);
}
-static void outliner_main_region_free(ARegion *UNUSED(region))
+static void outliner_main_region_free(ARegion * /*region*/)
{
}
@@ -285,7 +285,7 @@ static void outliner_main_region_message_subscribe(const wmRegionMessageSubscrib
/* ************************ header outliner area region *********************** */
/* add handlers, stuff you only do once or on area/region changes */
-static void outliner_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
+static void outliner_header_region_init(wmWindowManager * /*wm*/, ARegion *region)
{
ED_region_header_init(region);
}
@@ -295,7 +295,7 @@ static void outliner_header_region_draw(const bContext *C, ARegion *region)
ED_region_header(C, region);
}
-static void outliner_header_region_free(ARegion *UNUSED(region))
+static void outliner_header_region_free(ARegion * /*region*/)
{
}
@@ -321,7 +321,7 @@ static void outliner_header_region_listener(const wmRegionListenerParams *params
/* ******************** default callbacks for outliner space ***************** */
-static SpaceLink *outliner_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene))
+static SpaceLink *outliner_create(const ScrArea * /*area*/, const Scene * /*scene*/)
{
ARegion *region;
SpaceOutliner *space_outliner;
@@ -365,7 +365,7 @@ static void outliner_free(SpaceLink *sl)
}
/* spacetype; init callback */
-static void outliner_init(wmWindowManager *UNUSED(wm), ScrArea *area)
+static void outliner_init(wmWindowManager * /*wm*/, ScrArea *area)
{
SpaceOutliner *space_outliner = static_cast<SpaceOutliner *>(area->spacedata.first);
@@ -477,7 +477,7 @@ static void outliner_blend_read_data(BlendDataReader *reader, SpaceLink *sl)
space_outliner->runtime = nullptr;
}
-static void outliner_blend_read_lib(BlendLibReader *reader, ID *UNUSED(parent_id), SpaceLink *sl)
+static void outliner_blend_read_lib(BlendLibReader *reader, ID * /*parent_id*/, SpaceLink *sl)
{
SpaceOutliner *space_outliner = (SpaceOutliner *)sl;
diff --git a/source/blender/editors/space_outliner/tree/tree_element_rna.cc b/source/blender/editors/space_outliner/tree/tree_element_rna.cc
index 9e1f22b49d6..6e92fa087fb 100644
--- a/source/blender/editors/space_outliner/tree/tree_element_rna.cc
+++ b/source/blender/editors/space_outliner/tree/tree_element_rna.cc
@@ -52,7 +52,7 @@ bool TreeElementRNACommon::isRNAValid() const
return rna_ptr_.data != nullptr;
}
-bool TreeElementRNACommon::expandPoll(const SpaceOutliner &UNUSED(space_outliner)) const
+bool TreeElementRNACommon::expandPoll(const SpaceOutliner & /*space_outliner*/) const
{
return isRNAValid();
}
diff --git a/source/blender/editors/space_spreadsheet/space_spreadsheet.cc b/source/blender/editors/space_spreadsheet/space_spreadsheet.cc
index ee43519e260..b094222b16e 100644
--- a/source/blender/editors/space_spreadsheet/space_spreadsheet.cc
+++ b/source/blender/editors/space_spreadsheet/space_spreadsheet.cc
@@ -45,7 +45,7 @@
using namespace blender;
using namespace blender::ed::spreadsheet;
-static SpaceLink *spreadsheet_create(const ScrArea *UNUSED(area), const Scene *UNUSED(scene))
+static SpaceLink *spreadsheet_create(const ScrArea * /*area*/, const Scene * /*scene*/)
{
SpaceSpreadsheet *spreadsheet_space = MEM_cnew<SpaceSpreadsheet>("spreadsheet space");
spreadsheet_space->spacetype = SPACE_SPREADSHEET;
@@ -110,7 +110,7 @@ static void spreadsheet_free(SpaceLink *sl)
BKE_viewer_path_clear(&sspreadsheet->viewer_path);
}
-static void spreadsheet_init(wmWindowManager *UNUSED(wm), ScrArea *area)
+static void spreadsheet_init(wmWindowManager * /*wm*/, ScrArea *area)
{
SpaceSpreadsheet *sspreadsheet = (SpaceSpreadsheet *)area->spacedata.first;
if (sspreadsheet->runtime == nullptr) {
@@ -152,9 +152,7 @@ static void spreadsheet_keymap(wmKeyConfig *keyconf)
WM_keymap_ensure(keyconf, "Spreadsheet Generic", SPACE_SPREADSHEET, 0);
}
-static void spreadsheet_id_remap(ScrArea *UNUSED(area),
- SpaceLink *slink,
- const IDRemapper *mappings)
+static void spreadsheet_id_remap(ScrArea * /*area*/, SpaceLink *slink, const IDRemapper *mappings)
{
SpaceSpreadsheet *sspreadsheet = (SpaceSpreadsheet *)slink;
BKE_viewer_path_id_remap(&sspreadsheet->viewer_path, mappings);
@@ -510,7 +508,7 @@ static void spreadsheet_main_region_listener(const wmRegionListenerParams *param
}
}
-static void spreadsheet_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
+static void spreadsheet_header_region_init(wmWindowManager * /*wm*/, ARegion *region)
{
ED_region_header_init(region);
}
@@ -521,7 +519,7 @@ static void spreadsheet_header_region_draw(const bContext *C, ARegion *region)
ED_region_header(C, region);
}
-static void spreadsheet_header_region_free(ARegion *UNUSED(region))
+static void spreadsheet_header_region_free(ARegion * /*region*/)
{
}
@@ -565,7 +563,7 @@ static void spreadsheet_header_region_listener(const wmRegionListenerParams *par
}
}
-static void spreadsheet_footer_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
+static void spreadsheet_footer_region_init(wmWindowManager * /*wm*/, ARegion *region)
{
ED_region_header_init(region);
}
@@ -608,11 +606,11 @@ static void spreadsheet_footer_region_draw(const bContext *C, ARegion *region)
UI_block_draw(C, block);
}
-static void spreadsheet_footer_region_free(ARegion *UNUSED(region))
+static void spreadsheet_footer_region_free(ARegion * /*region*/)
{
}
-static void spreadsheet_footer_region_listener(const wmRegionListenerParams *UNUSED(params))
+static void spreadsheet_footer_region_listener(const wmRegionListenerParams * /*params*/)
{
}
@@ -654,11 +652,11 @@ static void spreadsheet_sidebar_init(wmWindowManager *wm, ARegion *region)
WM_event_add_keymap_handler(&region->handlers, keymap);
}
-static void spreadsheet_right_region_free(ARegion *UNUSED(region))
+static void spreadsheet_right_region_free(ARegion * /*region*/)
{
}
-static void spreadsheet_right_region_listener(const wmRegionListenerParams *UNUSED(params))
+static void spreadsheet_right_region_listener(const wmRegionListenerParams * /*params*/)
{
}
diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_draw.cc b/source/blender/editors/space_spreadsheet/spreadsheet_draw.cc
index e1f13f05715..e50e655853f 100644
--- a/source/blender/editors/space_spreadsheet/spreadsheet_draw.cc
+++ b/source/blender/editors/space_spreadsheet/spreadsheet_draw.cc
@@ -26,23 +26,23 @@ SpreadsheetDrawer::SpreadsheetDrawer()
SpreadsheetDrawer::~SpreadsheetDrawer() = default;
-void SpreadsheetDrawer::draw_top_row_cell(int UNUSED(column_index),
- const CellDrawParams &UNUSED(params)) const
+void SpreadsheetDrawer::draw_top_row_cell(int /*column_index*/,
+ const CellDrawParams & /*params*/) const
{
}
-void SpreadsheetDrawer::draw_left_column_cell(int UNUSED(row_index),
- const CellDrawParams &UNUSED(params)) const
+void SpreadsheetDrawer::draw_left_column_cell(int /*row_index*/,
+ const CellDrawParams & /*params*/) const
{
}
-void SpreadsheetDrawer::draw_content_cell(int UNUSED(row_index),
- int UNUSED(column_index),
- const CellDrawParams &UNUSED(params)) const
+void SpreadsheetDrawer::draw_content_cell(int /*row_index*/,
+ int /*column_index*/,
+ const CellDrawParams & /*params*/) const
{
}
-int SpreadsheetDrawer::column_width(int UNUSED(column_index)) const
+int SpreadsheetDrawer::column_width(int /*column_index*/) const
{
return 5 * UI_UNIT_X;
}
diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc b/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc
index 7e6b0ab18c3..b4b8417c172 100644
--- a/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc
+++ b/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc
@@ -342,7 +342,7 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
/* Tooltip showing raw byte values. Encode values in pointer to avoid memory allocation. */
UI_but_func_tooltip_set(
but,
- [](bContext * /*C*/, void *argN, const char *UNUSED(tip)) {
+ [](bContext * /*C*/, void *argN, const char * /*tip*/) {
const uint32_t uint_color = POINTER_AS_UINT(argN);
ColorGeometry4b color = *(ColorGeometry4b *)&uint_color;
return BLI_sprintfN(TIP_("Byte Color (sRGB encoded):\n%3d %3d %3d %3d"),
diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_ops.cc b/source/blender/editors/space_spreadsheet/spreadsheet_ops.cc
index 166c5de9fc3..baa58a7d824 100644
--- a/source/blender/editors/space_spreadsheet/spreadsheet_ops.cc
+++ b/source/blender/editors/space_spreadsheet/spreadsheet_ops.cc
@@ -22,7 +22,7 @@
using namespace blender::ed::spreadsheet;
-static int row_filter_add_exec(bContext *C, wmOperator *UNUSED(op))
+static int row_filter_add_exec(bContext *C, wmOperator * /*op*/)
{
SpaceSpreadsheet *sspreadsheet = CTX_wm_space_spreadsheet(C);
@@ -78,9 +78,7 @@ static void SPREADSHEET_OT_remove_row_filter_rule(wmOperatorType *ot)
RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "", 0, INT_MAX);
}
-static int select_component_domain_invoke(bContext *C,
- wmOperator *op,
- const wmEvent *UNUSED(event))
+static int select_component_domain_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
GeometryComponentType component_type = static_cast<GeometryComponentType>(
RNA_int_get(op->ptr, "component_type"));
diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_row_filter_ui.cc b/source/blender/editors/space_spreadsheet/spreadsheet_row_filter_ui.cc
index a1f6de56bb2..fa22da4f26a 100644
--- a/source/blender/editors/space_spreadsheet/spreadsheet_row_filter_ui.cc
+++ b/source/blender/editors/space_spreadsheet/spreadsheet_row_filter_ui.cc
@@ -30,7 +30,7 @@
using namespace blender;
using namespace blender::ed::spreadsheet;
-static void filter_panel_id_fn(void *UNUSED(row_filter_v), char *r_name)
+static void filter_panel_id_fn(void * /*row_filter_v*/, char *r_name)
{
/* All row filters use the same panel ID. */
BLI_snprintf(r_name, BKE_ST_MAXNAME, "SPREADSHEET_PT_filter");
@@ -304,7 +304,7 @@ static void filter_reorder(bContext *C, Panel *panel, int new_index)
BLI_listbase_link_move(row_filters, filter, new_index - current_index);
}
-static short get_filter_expand_flag(const bContext *UNUSED(C), Panel *panel)
+static short get_filter_expand_flag(const bContext * /*C*/, Panel *panel)
{
PointerRNA *filter_ptr = UI_panel_custom_data_get(panel);
SpreadsheetRowFilter *filter = (SpreadsheetRowFilter *)filter_ptr->data;
@@ -312,7 +312,7 @@ static short get_filter_expand_flag(const bContext *UNUSED(C), Panel *panel)
return short(filter->flag) & SPREADSHEET_ROW_FILTER_UI_EXPAND;
}
-static void set_filter_expand_flag(const bContext *UNUSED(C), Panel *panel, short expand_flag)
+static void set_filter_expand_flag(const bContext * /*C*/, Panel *panel, short expand_flag)
{
PointerRNA *filter_ptr = UI_panel_custom_data_get(panel);
SpreadsheetRowFilter *filter = (SpreadsheetRowFilter *)filter_ptr->data;
diff --git a/source/blender/editors/space_view3d/space_view3d.cc b/source/blender/editors/space_view3d/space_view3d.cc
index 345958d86ec..672922ac3e5 100644
--- a/source/blender/editors/space_view3d/space_view3d.cc
+++ b/source/blender/editors/space_view3d/space_view3d.cc
@@ -246,7 +246,7 @@ void ED_view3d_shade_update(Main *bmain, View3D *v3d, ScrArea *area)
/* ******************** default callbacks for view3d space ***************** */
-static SpaceLink *view3d_create(const ScrArea *UNUSED(area), const Scene *scene)
+static SpaceLink *view3d_create(const ScrArea * /*area*/, const Scene *scene)
{
ARegion *region;
View3D *v3d;
@@ -329,11 +329,11 @@ static void view3d_free(SpaceLink *sl)
}
/* spacetype; init callback */
-static void view3d_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area))
+static void view3d_init(wmWindowManager * /*wm*/, ScrArea * /*area*/)
{
}
-static void view3d_exit(wmWindowManager *UNUSED(wm), ScrArea *area)
+static void view3d_exit(wmWindowManager * /*wm*/, ScrArea *area)
{
BLI_assert(area->spacetype == SPACE_VIEW3D);
View3D *v3d = static_cast<View3D *>(area->spacedata.first);
@@ -540,7 +540,7 @@ static void view3d_ob_drop_draw_activate(struct wmDropBox *drop, wmDrag *drag)
}
}
-static void view3d_ob_drop_draw_deactivate(struct wmDropBox *drop, wmDrag *UNUSED(drag))
+static void view3d_ob_drop_draw_deactivate(struct wmDropBox *drop, wmDrag * /*drag*/)
{
V3DSnapCursorState *state = static_cast<V3DSnapCursorState *>(drop->draw_data);
if (state) {
@@ -604,7 +604,7 @@ static bool view3d_mat_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event
static char *view3d_mat_drop_tooltip(bContext *C,
wmDrag *drag,
const int xy[2],
- wmDropBox *UNUSED(drop))
+ wmDropBox * /*drop*/)
{
const char *name = WM_drag_get_item_name(drag);
ARegion *region = CTX_wm_region(C);
@@ -629,10 +629,10 @@ static bool view3d_object_data_drop_poll(bContext *C, wmDrag *drag, const wmEven
return false;
}
-static char *view3d_object_data_drop_tooltip(bContext *UNUSED(C),
- wmDrag *UNUSED(drag),
+static char *view3d_object_data_drop_tooltip(bContext * /*C*/,
+ wmDrag * /*drag*/,
const int UNUSED(xy[2]),
- wmDropBox *UNUSED(drop))
+ wmDropBox * /*drop*/)
{
return BLI_strdup(TIP_("Create object instance from object-data"));
}
@@ -694,9 +694,7 @@ static bool view3d_ima_empty_drop_poll(bContext *C, wmDrag *drag, const wmEvent
return false;
}
-static bool view3d_volume_drop_poll(bContext *UNUSED(C),
- wmDrag *drag,
- const wmEvent *UNUSED(event))
+static bool view3d_volume_drop_poll(bContext * /*C*/, wmDrag *drag, const wmEvent * /*event*/)
{
return (drag->type == WM_DRAG_PATH) && (drag->icon == ICON_FILE_VOLUME);
}
@@ -725,7 +723,7 @@ static void view3d_ob_drop_matrix_from_snap(V3DSnapCursorState *snap_state,
}
}
-static void view3d_ob_drop_copy_local_id(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
+static void view3d_ob_drop_copy_local_id(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
{
ID *id = WM_drag_get_local_ID(drag, ID_OB);
@@ -743,7 +741,7 @@ static void view3d_ob_drop_copy_local_id(bContext *UNUSED(C), wmDrag *drag, wmDr
/* Mostly the same logic as #view3d_collection_drop_copy_external_asset(), just different enough to
* make sharing code a bit difficult. */
-static void view3d_ob_drop_copy_external_asset(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
+static void view3d_ob_drop_copy_external_asset(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
{
/* NOTE(@campbellbarton): Selection is handled here, de-selecting objects before append,
* using auto-select to ensure the new objects are selected.
@@ -785,9 +783,7 @@ static void view3d_ob_drop_copy_external_asset(bContext *UNUSED(C), wmDrag *drag
}
}
-static void view3d_collection_drop_copy_local_id(bContext *UNUSED(C),
- wmDrag *drag,
- wmDropBox *drop)
+static void view3d_collection_drop_copy_local_id(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
{
ID *id = WM_drag_get_local_ID(drag, ID_GR);
RNA_int_set(drop->ptr, "session_uuid", int(id->session_uuid));
@@ -795,7 +791,7 @@ static void view3d_collection_drop_copy_local_id(bContext *UNUSED(C),
/* Mostly the same logic as #view3d_ob_drop_copy_external_asset(), just different enough to make
* sharing code a bit difficult. */
-static void view3d_collection_drop_copy_external_asset(bContext *UNUSED(C),
+static void view3d_collection_drop_copy_external_asset(bContext * /*C*/,
wmDrag *drag,
wmDropBox *drop)
{
@@ -834,14 +830,14 @@ static void view3d_collection_drop_copy_external_asset(bContext *UNUSED(C),
ED_undo_push(C, "Collection_Drop");
}
-static void view3d_id_drop_copy(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
+static void view3d_id_drop_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
{
ID *id = WM_drag_get_local_ID_or_import_from_asset(drag, 0);
WM_operator_properties_id_lookup_set_from_id(drop->ptr, id);
}
-static void view3d_id_drop_copy_with_type(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
+static void view3d_id_drop_copy_with_type(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
{
ID *id = WM_drag_get_local_ID_or_import_from_asset(drag, 0);
@@ -849,7 +845,7 @@ static void view3d_id_drop_copy_with_type(bContext *UNUSED(C), wmDrag *drag, wmD
WM_operator_properties_id_lookup_set_from_id(drop->ptr, id);
}
-static void view3d_id_path_drop_copy(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
+static void view3d_id_path_drop_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
{
ID *id = WM_drag_get_local_ID_or_import_from_asset(drag, 0);
@@ -1339,7 +1335,7 @@ static void view3d_main_region_listener(const wmRegionListenerParams *params)
}
static void view3d_do_msg_notify_workbench_view_update(struct bContext *C,
- struct wmMsgSubscribeKey *UNUSED(msg_key),
+ struct wmMsgSubscribeKey * /*msg_key*/,
struct wmMsgSubscribeValue *msg_val)
{
Scene *scene = CTX_data_scene(C);
diff --git a/source/blender/editors/space_view3d/view3d_draw.cc b/source/blender/editors/space_view3d/view3d_draw.cc
index 57c104455cd..ab77cf3407a 100644
--- a/source/blender/editors/space_view3d/view3d_draw.cc
+++ b/source/blender/editors/space_view3d/view3d_draw.cc
@@ -1144,7 +1144,7 @@ static void view3d_draw_border(const bContext *C, ARegion *region)
/**
* Draw Info
*/
-static void view3d_draw_grease_pencil(const bContext *UNUSED(C))
+static void view3d_draw_grease_pencil(const bContext * /*C*/)
{
/* TODO: viewport. */
}
@@ -2406,7 +2406,7 @@ void ED_view3d_depths_free(ViewDepths *depths)
* \{ */
void ED_view3d_datamask(const bContext *C,
- const Scene *UNUSED(scene),
+ const Scene * /*scene*/,
const View3D *v3d,
CustomData_MeshMasks *r_cddata_masks)
{
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc b/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc
index 83d1ed5f552..c61eac3c777 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc
+++ b/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc
@@ -277,9 +277,9 @@ static void gizmo_preselect_elem_free(wmGizmo *gz)
MEM_SAFE_FREE(gz_ele->bases);
}
-static int gizmo_preselect_elem_invoke(bContext *UNUSED(C),
- wmGizmo *UNUSED(gz),
- const wmEvent *UNUSED(event))
+static int gizmo_preselect_elem_invoke(bContext * /*C*/,
+ wmGizmo * /*gz*/,
+ const wmEvent * /*event*/)
{
return OPERATOR_PASS_THROUGH;
}
@@ -447,9 +447,9 @@ static void gizmo_preselect_edgering_free(wmGizmo *gz)
MEM_SAFE_FREE(gz_ring->bases);
}
-static int gizmo_preselect_edgering_invoke(bContext *UNUSED(C),
- wmGizmo *UNUSED(gz),
- const wmEvent *UNUSED(event))
+static int gizmo_preselect_edgering_invoke(bContext * /*C*/,
+ wmGizmo * /*gz*/,
+ const wmEvent * /*event*/)
{
return OPERATOR_PASS_THROUGH;
}
diff --git a/source/blender/editors/space_view3d/view3d_select.cc b/source/blender/editors/space_view3d/view3d_select.cc
index 0e266f5eae2..5e9720d119e 100644
--- a/source/blender/editors/space_view3d/view3d_select.cc
+++ b/source/blender/editors/space_view3d/view3d_select.cc
@@ -696,7 +696,7 @@ static bool do_lasso_select_pose(ViewContext *vc,
static void do_lasso_select_mesh__doSelectVert(void *userData,
BMVert *eve,
const float screen_co[2],
- int UNUSED(index))
+ int /*index*/)
{
LassoSelectUserData *data = static_cast<LassoSelectUserData *>(userData);
const bool is_select = BM_elem_flag_test(eve, BM_ELEM_SELECT);
@@ -775,7 +775,7 @@ static void do_lasso_select_mesh__doSelectEdge_pass1(void *user_data,
static void do_lasso_select_mesh__doSelectFace(void *userData,
BMFace *efa,
const float screen_co[2],
- int UNUSED(index))
+ int /*index*/)
{
LassoSelectUserData *data = static_cast<LassoSelectUserData *>(userData);
const bool is_select = BM_elem_flag_test(efa, BM_ELEM_SELECT);
@@ -883,7 +883,7 @@ static bool do_lasso_select_mesh(ViewContext *vc,
}
static void do_lasso_select_curve__doSelect(void *userData,
- Nurb *UNUSED(nu),
+ Nurb * /*nu*/,
BPoint *bp,
BezTriple *bezt,
int beztindex,
@@ -1443,8 +1443,8 @@ static SelMenuItemF object_mouse_select_menu_data[SEL_MENU_SIZE];
/* special (crappy) operator only for menu select */
static const EnumPropertyItem *object_select_menu_enum_itemf(bContext *C,
- PointerRNA *UNUSED(ptr),
- PropertyRNA *UNUSED(prop),
+ PointerRNA * /*ptr*/,
+ PropertyRNA * /*prop*/,
bool *r_free)
{
EnumPropertyItem *item = nullptr, item_tmp = {0};
@@ -1917,7 +1917,7 @@ static bool selectbuffer_has_bones(const GPUSelectResult *buffer, const uint hit
}
/* utility function for mixed_bones_object_selectbuffer */
-static int selectbuffer_ret_hits_15(GPUSelectResult *UNUSED(buffer), const int hits15)
+static int selectbuffer_ret_hits_15(GPUSelectResult * /*buffer*/, const int hits15)
{
return hits15;
}
@@ -3262,7 +3262,7 @@ static bool do_paintface_box_select(ViewContext *vc,
}
static void do_nurbs_box_select__doSelect(void *userData,
- Nurb *UNUSED(nu),
+ Nurb * /*nu*/,
BPoint *bp,
BezTriple *bezt,
int beztindex,
@@ -3362,7 +3362,7 @@ static bool do_lattice_box_select(ViewContext *vc, rcti *rect, const eSelectOp s
static void do_mesh_box_select__doSelectVert(void *userData,
BMVert *eve,
const float screen_co[2],
- int UNUSED(index))
+ int /*index*/)
{
BoxSelectUserData *data = static_cast<BoxSelectUserData *>(userData);
const bool is_select = BM_elem_flag_test(eve, BM_ELEM_SELECT);
@@ -3429,7 +3429,7 @@ static void do_mesh_box_select__doSelectEdge_pass1(
static void do_mesh_box_select__doSelectFace(void *userData,
BMFace *efa,
const float screen_co[2],
- int UNUSED(index))
+ int /*index*/)
{
BoxSelectUserData *data = static_cast<BoxSelectUserData *>(userData);
const bool is_select = BM_elem_flag_test(efa, BM_ELEM_SELECT);
@@ -3997,7 +3997,7 @@ static void view3d_userdata_circleselect_init(CircleSelectUserData *r_data,
static void mesh_circle_doSelectVert(void *userData,
BMVert *eve,
const float screen_co[2],
- int UNUSED(index))
+ int /*index*/)
{
CircleSelectUserData *data = static_cast<CircleSelectUserData *>(userData);
@@ -4010,7 +4010,7 @@ static void mesh_circle_doSelectEdge(void *userData,
BMEdge *eed,
const float screen_co_a[2],
const float screen_co_b[2],
- int UNUSED(index))
+ int /*index*/)
{
CircleSelectUserData *data = static_cast<CircleSelectUserData *>(userData);
@@ -4022,7 +4022,7 @@ static void mesh_circle_doSelectEdge(void *userData,
static void mesh_circle_doSelectFace(void *userData,
BMFace *efa,
const float screen_co[2],
- int UNUSED(index))
+ int /*index*/)
{
CircleSelectUserData *data = static_cast<CircleSelectUserData *>(userData);
@@ -4243,11 +4243,11 @@ static bool paint_vertsel_circle_select(ViewContext *vc,
}
static void nurbscurve_circle_doSelect(void *userData,
- Nurb *UNUSED(nu),
+ Nurb * /*nu*/,
BPoint *bp,
BezTriple *bezt,
int beztindex,
- bool UNUSED(handles_visible),
+ bool /*handles_visible*/,
const float screen_co[2])
{
CircleSelectUserData *data = static_cast<CircleSelectUserData *>(userData);
diff --git a/source/blender/editors/transform/transform_snap_object.cc b/source/blender/editors/transform/transform_snap_object.cc
index 2f77009e720..90a13722b63 100644
--- a/source/blender/editors/transform/transform_snap_object.cc
+++ b/source/blender/editors/transform/transform_snap_object.cc
@@ -1244,7 +1244,7 @@ static void nearest_world_tree_co(BVHTree *tree,
}
}
-static bool nearest_world_tree(SnapObjectContext *UNUSED(sctx),
+static bool nearest_world_tree(SnapObjectContext * /*sctx*/,
const struct SnapObjectParams *params,
BVHTree *tree,
BVHTree_NearestPointCallback nearest_cb,
@@ -2200,7 +2200,7 @@ static eSnapMode snapArmature(SnapObjectContext *sctx,
float *dist_px,
/* return args */
float r_loc[3],
- float *UNUSED(r_no),
+ float * /*r_no*/,
int *r_index)
{
eSnapMode retval = SCE_SNAP_MODE_NONE;
@@ -2367,7 +2367,7 @@ static eSnapMode snapCurve(SnapObjectContext *sctx,
float *dist_px,
/* return args */
float r_loc[3],
- float *UNUSED(r_no),
+ float * /*r_no*/,
int *r_index)
{
bool has_snap = false;
@@ -2537,7 +2537,7 @@ static eSnapMode snap_object_center(const SnapObjectContext *sctx,
float *dist_px,
/* return args */
float r_loc[3],
- float *UNUSED(r_no),
+ float * /*r_no*/,
int *r_index)
{
eSnapMode retval = SCE_SNAP_MODE_NONE;
diff --git a/source/blender/editors/util/ed_util_ops.cc b/source/blender/editors/util/ed_util_ops.cc
index d25179a1b70..18d47af7854 100644
--- a/source/blender/editors/util/ed_util_ops.cc
+++ b/source/blender/editors/util/ed_util_ops.cc
@@ -125,7 +125,7 @@ static bool lib_id_generate_preview_poll(bContext *C)
return true;
}
-static int lib_id_generate_preview_exec(bContext *C, wmOperator *UNUSED(op))
+static int lib_id_generate_preview_exec(bContext *C, wmOperator * /*op*/)
{
PointerRNA idptr = CTX_data_pointer_get(C, "id");
ID *id = (ID *)idptr.data;
@@ -170,7 +170,7 @@ static bool lib_id_generate_preview_from_object_poll(bContext *C)
return true;
}
-static int lib_id_generate_preview_from_object_exec(bContext *C, wmOperator *UNUSED(op))
+static int lib_id_generate_preview_from_object_exec(bContext *C, wmOperator * /*op*/)
{
PointerRNA idptr = CTX_data_pointer_get(C, "id");
ID *id = (ID *)idptr.data;
@@ -304,7 +304,7 @@ static bool lib_id_override_editable_toggle_poll(bContext *C)
return id && ID_IS_OVERRIDE_LIBRARY_REAL(id) && !ID_IS_LINKED(id);
}
-static int lib_id_override_editable_toggle_exec(bContext *C, wmOperator *UNUSED(op))
+static int lib_id_override_editable_toggle_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
const PointerRNA id_ptr = CTX_data_pointer_get_type(C, "id", &RNA_ID);
@@ -346,7 +346,7 @@ static void ED_OT_lib_id_override_editable_toggle(wmOperatorType *ot)
/** \name General editor utils.
* \{ */
-static int ed_flush_edits_exec(bContext *C, wmOperator *UNUSED(op))
+static int ed_flush_edits_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
ED_editors_flush_edits(bmain);