diff options
author | Jacques Lucke <jacques@blender.org> | 2020-09-09 19:41:07 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-09-09 19:41:07 +0300 |
commit | 63916f5941b443dfc8566682bb75374e5abd553f (patch) | |
tree | fb0704701f1d4d9acbddf4a6fbc62c819d8d4c36 /source/blender/editors/space_clip/clip_editor.c | |
parent | 0cff2c944f9c2cd3ac873fe826c4399fc2f32159 (diff) |
Cleanup: reduce variable scope
Diffstat (limited to 'source/blender/editors/space_clip/clip_editor.c')
-rw-r--r-- | source/blender/editors/space_clip/clip_editor.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index 83096b4eded..b2c80faec0b 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -940,11 +940,10 @@ static void start_prefetch_threads(MovieClip *clip, short *do_update, float *progress) { - PrefetchQueue queue; - TaskPool *task_pool; - int i, tot_thread = BLI_task_scheduler_num_threads(); + int tot_thread = BLI_task_scheduler_num_threads(); /* initialize queue */ + PrefetchQueue queue; BLI_spin_init(&queue.spin); queue.current_frame = current_frame; @@ -959,8 +958,8 @@ static void start_prefetch_threads(MovieClip *clip, queue.do_update = do_update; queue.progress = progress; - task_pool = BLI_task_pool_create(&queue, TASK_PRIORITY_LOW); - for (i = 0; i < tot_thread; i++) { + TaskPool *task_pool = BLI_task_pool_create(&queue, TASK_PRIORITY_LOW); + for (int i = 0; i < tot_thread; i++) { BLI_task_pool_push(task_pool, prefetch_task_func, clip, false, NULL); } BLI_task_pool_work_and_wait(task_pool); |