diff options
author | Hans Goudey <h.goudey@me.com> | 2022-10-04 01:37:25 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-10-04 01:38:16 +0300 |
commit | 97746129d5870beedc40e3c035c7982ce8a6bebc (patch) | |
tree | b819b8e7875e6684aad7ea1f6bb7922d4fa1c8fc /source/blender/editors/space_outliner | |
parent | ed7f5713f8f9d605e3cd4cce42e40fb5c6bf4bf5 (diff) |
Cleanup: replace UNUSED macro with commented args in C++ code
This is the conventional way of dealing with unused arguments in C++,
since it works on all compilers.
Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
Diffstat (limited to 'source/blender/editors/space_outliner')
8 files changed, 173 insertions, 175 deletions
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(); } |