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_file | |
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_file')
-rw-r--r-- | source/blender/editors/space_file/asset_catalog_tree_view.cc | 2 | ||||
-rw-r--r-- | source/blender/editors/space_file/file_indexer.cc | 14 | ||||
-rw-r--r-- | source/blender/editors/space_file/filelist.cc | 22 |
3 files changed, 19 insertions, 19 deletions
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. */ |