From 63916f5941b443dfc8566682bb75374e5abd553f Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Wed, 9 Sep 2020 18:41:07 +0200 Subject: Cleanup: reduce variable scope --- source/blender/editors/space_clip/clip_ops.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/space_clip/clip_ops.c') diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 8532d8420f9..013731a50d6 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -1412,17 +1412,16 @@ static void do_sequence_proxy(void *pjv, ProxyJob *pj = pjv; MovieClip *clip = pj->clip; Scene *scene = pj->scene; - TaskPool *task_pool; int sfra = SFRA, efra = EFRA; ProxyThread *handles; - int i, tot_thread = BLI_task_scheduler_num_threads(); + int tot_thread = BLI_task_scheduler_num_threads(); int width, height; - ProxyQueue queue; if (build_undistort_count) { BKE_movieclip_get_size(clip, NULL, &width, &height); } + ProxyQueue queue; BLI_spin_init(&queue.spin); queue.cfra = sfra; @@ -1432,9 +1431,9 @@ static void do_sequence_proxy(void *pjv, queue.do_update = do_update; queue.progress = progress; - task_pool = BLI_task_pool_create(&queue, TASK_PRIORITY_LOW); + TaskPool *task_pool = BLI_task_pool_create(&queue, TASK_PRIORITY_LOW); handles = MEM_callocN(sizeof(ProxyThread) * tot_thread, "proxy threaded handles"); - for (i = 0; i < tot_thread; i++) { + for (int i = 0; i < tot_thread; i++) { ProxyThread *handle = &handles[i]; handle->clip = clip; @@ -1456,7 +1455,7 @@ static void do_sequence_proxy(void *pjv, BLI_task_pool_free(task_pool); if (build_undistort_count) { - for (i = 0; i < tot_thread; i++) { + for (int i = 0; i < tot_thread; i++) { ProxyThread *handle = &handles[i]; BKE_tracking_distortion_free(handle->distortion); } -- cgit v1.2.3