Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-09-09 19:41:07 +0300
committerJacques Lucke <jacques@blender.org>2020-09-09 19:41:07 +0300
commit63916f5941b443dfc8566682bb75374e5abd553f (patch)
treefb0704701f1d4d9acbddf4a6fbc62c819d8d4c36 /source/blender/editors/space_clip/clip_ops.c
parent0cff2c944f9c2cd3ac873fe826c4399fc2f32159 (diff)
Cleanup: reduce variable scope
Diffstat (limited to 'source/blender/editors/space_clip/clip_ops.c')
-rw-r--r--source/blender/editors/space_clip/clip_ops.c11
1 files changed, 5 insertions, 6 deletions
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);
}