From b08e18ff36bb49d8e5651f8f53fff972bd773b61 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Tue, 21 Apr 2020 15:57:51 +0200 Subject: [PATCH] CleanUp: Remove thread_id from `TaskFreeFunction` It isn't used; cleanup related to {D7475} --- source/blender/blenlib/BLI_task.h | 2 +- source/blender/blenlib/intern/task_pool.cc | 4 ++-- source/blender/editors/space_file/filelist.c | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) 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;