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/blenloader | |
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/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.cc | 21 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.cc | 20 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.cc | 2 |
3 files changed, 20 insertions, 23 deletions
diff --git a/source/blender/blenloader/intern/readfile.cc b/source/blender/blenloader/intern/readfile.cc index fa9368db0d8..a527c16fa6e 100644 --- a/source/blender/blenloader/intern/readfile.cc +++ b/source/blender/blenloader/intern/readfile.cc @@ -921,7 +921,7 @@ BHead *blo_bhead_first(FileData *fd) return bhead; } -BHead *blo_bhead_prev(FileData *UNUSED(fd), BHead *thisblock) +BHead *blo_bhead_prev(FileData * /*fd*/, BHead *thisblock) { BHeadN *bheadn = BHEADN_FROM_BHEAD(thisblock); BHeadN *prev = bheadn->prev; @@ -1711,7 +1711,7 @@ typedef struct BLOCacheStorageValue { /** Register a cache data entry to be preserved when reading some undo memfile. */ static void blo_cache_storage_entry_register( - ID *id, const IDCacheKey *key, void **cache_p, uint UNUSED(flags), void *cache_storage_v) + ID *id, const IDCacheKey *key, void **cache_p, uint /*flags*/, void *cache_storage_v) { BLI_assert(key->id_session_uuid == id->session_uuid); UNUSED_VARS_NDEBUG(id); @@ -1731,7 +1731,7 @@ static void blo_cache_storage_entry_register( /** Restore a cache data entry from old ID into new one, when reading some undo memfile. */ static void blo_cache_storage_entry_restore_in_new( - ID *UNUSED(id), const IDCacheKey *key, void **cache_p, uint flags, void *cache_storage_v) + ID * /*id*/, const IDCacheKey *key, void **cache_p, uint flags, void *cache_storage_v) { BLOCacheStorage *cache_storage = static_cast<BLOCacheStorage *>(cache_storage_v); @@ -1756,11 +1756,8 @@ static void blo_cache_storage_entry_restore_in_new( } /** Clear as needed a cache data entry from old ID, when reading some undo memfile. */ -static void blo_cache_storage_entry_clear_in_old(ID *UNUSED(id), - const IDCacheKey *key, - void **cache_p, - uint UNUSED(flags), - void *cache_storage_v) +static void blo_cache_storage_entry_clear_in_old( + ID * /*id*/, const IDCacheKey *key, void **cache_p, uint /*flags*/, void *cache_storage_v) { BLOCacheStorage *cache_storage = static_cast<BLOCacheStorage *>(cache_storage_v); @@ -2887,7 +2884,7 @@ static void direct_link_library(FileData *fd, Library *lib, Main *main) id_us_ensure_real(&lib->id); } -static void lib_link_library(BlendLibReader *UNUSED(reader), Library *UNUSED(lib)) +static void lib_link_library(BlendLibReader * /*reader*/, Library * /*lib*/) { } @@ -3230,7 +3227,7 @@ static bool read_libblock_undo_restore_linked(FileData *fd, Main *main, const ID /* For undo, restore unchanged datablock from old main. */ static void read_libblock_undo_restore_identical( - FileData *fd, Main *main, const ID *UNUSED(id), ID *id_old, const int tag) + FileData *fd, Main *main, const ID * /*id*/, ID *id_old, const int tag) { BLI_assert((fd->skip_flags & BLO_READ_SKIP_UNDO_OLD_MAIN) == 0); BLI_assert(id_old != nullptr); @@ -3597,7 +3594,7 @@ static void link_global(FileData *fd, BlendFileData *bfd) /** \name Versioning * \{ */ -static void do_versions_userdef(FileData *UNUSED(fd), BlendFileData *bfd) +static void do_versions_userdef(FileData * /*fd*/, BlendFileData *bfd) { UserDef *user = bfd->user; @@ -5121,7 +5118,7 @@ static void convert_pointer_array_64_to_32(BlendDataReader *reader, } } -static void convert_pointer_array_32_to_64(BlendDataReader *UNUSED(reader), +static void convert_pointer_array_32_to_64(BlendDataReader * /*reader*/, uint array_size, const uint32_t *src, uint64_t *dst) diff --git a/source/blender/blenloader/intern/versioning_300.cc b/source/blender/blenloader/intern/versioning_300.cc index 95bdb9b0a1c..256eed76ffd 100644 --- a/source/blender/blenloader/intern/versioning_300.cc +++ b/source/blender/blenloader/intern/versioning_300.cc @@ -465,13 +465,13 @@ static void do_versions_sequencer_speed_effect_recursive(Scene *scene, const Lis #undef SEQ_SPEED_COMPRESS_IPO_Y } -static bool do_versions_sequencer_color_tags(Sequence *seq, void *UNUSED(user_data)) +static bool do_versions_sequencer_color_tags(Sequence *seq, void * /*user_data*/) { seq->color_tag = SEQUENCE_COLOR_NONE; return true; } -static bool do_versions_sequencer_color_balance_sop(Sequence *seq, void *UNUSED(user_data)) +static bool do_versions_sequencer_color_balance_sop(Sequence *seq, void * /*user_data*/) { LISTBASE_FOREACH (SequenceModifierData *, smd, &seq->modifiers) { if (smd->type == seqModifierType_ColorBalance) { @@ -670,7 +670,7 @@ static bool seq_speed_factor_set(Sequence *seq, void *user_data) return true; } -void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports)) +void do_versions_after_linking_300(Main *bmain, ReportList * /*reports*/) { if (MAIN_VERSION_ATLEAST(bmain, 300, 0) && !MAIN_VERSION_ATLEAST(bmain, 300, 1)) { /* Set zero user text objects to have a fake user. */ @@ -1028,9 +1028,9 @@ static void do_version_bbone_len_scale_fcurve_fix(FCurve *fcu) replace_bbone_len_scale_rnapath(&fcu->rna_path, &fcu->array_index); } -static void do_version_bbone_len_scale_animdata_cb(ID *UNUSED(id), +static void do_version_bbone_len_scale_animdata_cb(ID * /*id*/, AnimData *adt, - void *UNUSED(wrapper_data)) + void * /*wrapper_data*/) { LISTBASE_FOREACH_MUTABLE (FCurve *, fcu, &adt->drivers) { do_version_bbone_len_scale_fcurve_fix(fcu); @@ -1078,7 +1078,7 @@ static bNodeSocket *do_version_replace_float_size_with_vector(bNodeTree *ntree, return new_socket; } -static bool seq_transform_origin_set(Sequence *seq, void *UNUSED(user_data)) +static bool seq_transform_origin_set(Sequence *seq, void * /*user_data*/) { StripTransform *transform = seq->strip->transform; if (seq->strip->transform != nullptr) { @@ -1087,7 +1087,7 @@ static bool seq_transform_origin_set(Sequence *seq, void *UNUSED(user_data)) return true; } -static bool seq_transform_filter_set(Sequence *seq, void *UNUSED(user_data)) +static bool seq_transform_filter_set(Sequence *seq, void * /*user_data*/) { StripTransform *transform = seq->strip->transform; if (seq->strip->transform != nullptr) { @@ -1096,7 +1096,7 @@ static bool seq_transform_filter_set(Sequence *seq, void *UNUSED(user_data)) return true; } -static bool seq_meta_channels_ensure(Sequence *seq, void *UNUSED(user_data)) +static bool seq_meta_channels_ensure(Sequence *seq, void * /*user_data*/) { if (seq->type == SEQ_TYPE_META) { SEQ_channels_ensure(&seq->channels); @@ -1341,7 +1341,7 @@ static bool version_fix_seq_meta_range(Sequence *seq, void *user_data) return true; } -static bool version_merge_still_offsets(Sequence *seq, void *UNUSED(user_data)) +static bool version_merge_still_offsets(Sequence *seq, void * /*user_data*/) { seq->startofs -= seq->startstill; seq->endofs -= seq->endstill; @@ -1933,7 +1933,7 @@ static void version_geometry_nodes_replace_transfer_attribute_node(bNodeTree *nt } /* NOLINTNEXTLINE: readability-function-size */ -void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) +void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) { /* The #SCE_SNAP_SEQ flag has been removed in favor of the #SCE_SNAP which can be used for each * snap_flag member individually. */ diff --git a/source/blender/blenloader/intern/writefile.cc b/source/blender/blenloader/intern/writefile.cc index f789aa157e9..4625a4471fe 100644 --- a/source/blender/blenloader/intern/writefile.cc +++ b/source/blender/blenloader/intern/writefile.cc @@ -643,7 +643,7 @@ static void mywrite_id_begin(WriteData *wd, ID *id) * * Only does something when storing an undo step. */ -static void mywrite_id_end(WriteData *wd, ID *UNUSED(id)) +static void mywrite_id_end(WriteData *wd, ID * /*id*/) { if (wd->use_memfile) { /* Very important to do it after every ID write now, otherwise we cannot know whether a |