diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-11-23 03:27:02 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-11-23 09:40:10 +0300 |
commit | 2e348fd43ee2bc7285fe4461171d51f307dabf92 (patch) | |
tree | 7e12478710dc214033b2d3e724d48ab4e2b758b5 /source/blender/blenkernel/intern/dynamicpaint.c | |
parent | bc8504cb4c93eb3aac22222f62966c13560a2bf6 (diff) |
Cleanup: shadowing (blenkernel)
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index f3ce988ee17..0a9a7a33ec6 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -2536,11 +2536,11 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface) /* Generate surface adjacency data. */ { - int i, cursor = 0; + int cursor = 0; /* Create a temporary array of final indexes (before unassigned * pixels have been dropped) */ - for (i = 0; i < w * h; i++) { + for (int i = 0; i < w * h; i++) { if (tempPoints[i].tri_index != -1) { final_index[i] = cursor; cursor++; @@ -2556,13 +2556,13 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface) for (ty = 0; ty < h; ty++) { int tx; for (tx = 0; tx < w; tx++) { - int i, index = tx + w * ty; + int index = tx + w * ty; if (tempPoints[index].tri_index != -1) { ed->n_index[final_index[index]] = n_pos; ed->n_num[final_index[index]] = 0; - for (i = 0; i < 8; i++) { + for (int i = 0; i < 8; i++) { /* Try to find a neighboring pixel in defined direction * If not found, -1 is returned */ @@ -3628,7 +3628,6 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface, float timescale) { ParticleSettings *part = psys->part; - ParticleData *pa = NULL; PaintSurfaceData *sData = surface->data; PaintBakeData *bData = sData->bData; VolumeGrid *grid = bData->grid; @@ -3654,7 +3653,8 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface, tree = BLI_kdtree_new(psys->totpart); /* loop through particles and insert valid ones to the tree */ - for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) { + p = 0; + for (ParticleData *pa = psys->particles; p < psys->totpart; p++, pa++) { /* Proceed only if particle is active */ if (pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN) == 0) continue; |