[Bf-blender-cvs] [b08e18ff36b] master: CleanUp: Remove thread_id from `TaskFreeFunction`

Jeroen Bakker noreply at git.blender.org
Tue Apr 21 15:59:08 CEST 2020


Commit: b08e18ff36bb49d8e5651f8f53fff972bd773b61
Author: Jeroen Bakker
Date:   Tue Apr 21 15:57:51 2020 +0200
Branches: master
https://developer.blender.org/rBb08e18ff36bb49d8e5651f8f53fff972bd773b61

CleanUp: Remove thread_id from `TaskFreeFunction`

It isn't used; cleanup related to {D7475}

===================================================================

M	source/blender/blenlib/BLI_task.h
M	source/blender/blenlib/intern/task_pool.cc
M	source/blender/editors/space_file/filelist.c

===================================================================

diff --git a/source/blender/blenlib/BLI_task.h b/source/blender/blenlib/BLI_task.h
index def41cf0a82..2b5964d091c 100644
--- a/source/blender/blenlib/BLI_task.h
+++ b/source/blender/blenlib/BLI_task.h
@@ -71,7 +71,7 @@ typedef enum TaskPriority {
 
 typedef struct TaskPool TaskPool;
 typedef void (*TaskRunFunction)(TaskPool *__restrict pool, void *taskdata, int threadid);
-typedef void (*TaskFreeFunction)(TaskPool *__restrict pool, void *taskdata, int threadid);
+typedef void (*TaskFreeFunction)(TaskPool *__restrict pool, void *taskdata);
 
 TaskPool *BLI_task_pool_create(TaskScheduler *scheduler, void *userdata, TaskPriority priority);
 TaskPool *BLI_task_pool_create_background(TaskScheduler *scheduler,
diff --git a/source/blender/blenlib/intern/task_pool.cc b/source/blender/blenlib/intern/task_pool.cc
index 95d5388435b..60ed156105c 100644
--- a/source/blender/blenlib/intern/task_pool.cc
+++ b/source/blender/blenlib/intern/task_pool.cc
@@ -230,11 +230,11 @@ typedef struct TaskThread {
 } TaskThread;
 
 /* Helper */
-BLI_INLINE void task_data_free(Task *task, const int thread_id)
+BLI_INLINE void task_data_free(Task *task, const int UNUSED(thread_id))
 {
   if (task->free_taskdata) {
     if (task->freedata) {
-      task->freedata(task->pool, task->taskdata, thread_id);
+      task->freedata(task->pool, task->taskdata);
     }
     else {
       MEM_freeN(task->taskdata);
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index fbaebb66e01..c04d08d7b78 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -1306,9 +1306,7 @@ static void filelist_cache_preview_runf(TaskPool *__restrict pool,
   //  printf("%s: End (%d)...\n", __func__, threadid);
 }
 
-static void filelist_cache_preview_freef(TaskPool *__restrict UNUSED(pool),
-                                         void *taskdata,
-                                         int UNUSED(threadid))
+static void filelist_cache_preview_freef(TaskPool *__restrict UNUSED(pool), void *taskdata)
 {
   FileListEntryPreviewTaskData *preview_taskdata = taskdata;
   FileListEntryPreview *preview = preview_taskdata->preview;



More information about the Bf-blender-cvs mailing list