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/blenlib/tests/BLI_task_test.cc | |
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/blenlib/tests/BLI_task_test.cc')
-rw-r--r-- | source/blender/blenlib/tests/BLI_task_test.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/blenlib/tests/BLI_task_test.cc b/source/blender/blenlib/tests/BLI_task_test.cc index a933d45e7cd..63bb767466f 100644 --- a/source/blender/blenlib/tests/BLI_task_test.cc +++ b/source/blender/blenlib/tests/BLI_task_test.cc @@ -27,7 +27,7 @@ static void task_range_iter_func(void *userdata, int index, const TaskParallelTL // printf("%d, %d, %d\n", index, data[index], *((int *)tls->userdata_chunk)); } -static void task_range_iter_reduce_func(const void *__restrict UNUSED(userdata), +static void task_range_iter_reduce_func(const void *__restrict /*userdata*/, void *__restrict join_v, void *__restrict userdata_chunk) { @@ -71,7 +71,7 @@ TEST(task, RangeIter) static void task_mempool_iter_func(void *userdata, MempoolIterData *item, - const TaskParallelTLS *__restrict UNUSED(tls)) + const TaskParallelTLS *__restrict /*tls*/) { int *data = (int *)item; int *count = (int *)userdata; @@ -147,7 +147,7 @@ using TaskMemPool_Chunk = struct TaskMemPool_Chunk { ListBase *accumulate_items; }; -static void task_mempool_iter_tls_func(void *UNUSED(userdata), +static void task_mempool_iter_tls_func(void * /*userdata*/, MempoolIterData *item, const TaskParallelTLS *__restrict tls) { @@ -165,7 +165,7 @@ static void task_mempool_iter_tls_func(void *UNUSED(userdata), BLI_addtail(task_data->accumulate_items, BLI_genericNodeN(data)); } -static void task_mempool_iter_tls_reduce(const void *__restrict UNUSED(userdata), +static void task_mempool_iter_tls_reduce(const void *__restrict /*userdata*/, void *__restrict chunk_join, void *__restrict chunk) { @@ -180,8 +180,7 @@ static void task_mempool_iter_tls_reduce(const void *__restrict UNUSED(userdata) } } -static void task_mempool_iter_tls_free(const void *UNUSED(userdata), - void *__restrict userdata_chunk) +static void task_mempool_iter_tls_free(const void * /*userdata*/, void *__restrict userdata_chunk) { TaskMemPool_Chunk *task_data = (TaskMemPool_Chunk *)userdata_chunk; MEM_freeN(task_data->accumulate_items); @@ -240,7 +239,7 @@ TEST(task, MempoolIterTLS) static void task_listbase_iter_func(void *userdata, void *item, int index, - const TaskParallelTLS *__restrict UNUSED(tls)) + const TaskParallelTLS *__restrict /*tls*/) { LinkData *data = (LinkData *)item; int *count = (int *)userdata; |