diff options
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/displist.c | 12 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle_distribute.c | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index c860e57520d..708b1971bd5 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -875,9 +875,9 @@ static float (*displist_vert_coords_alloc(ListBase *dispbase, int *r_vert_len))[ allverts = MEM_mallocN(sizeof(float[3]) * (*r_vert_len), "displist_vert_coords_alloc allverts"); fp = (float *)allverts; LISTBASE_FOREACH (DispList *, dl, dispbase) { - int offs = 3 * ((dl->type == DL_INDEX3) ? dl->nr : dl->parts * dl->nr); - memcpy(fp, dl->verts, sizeof(float) * offs); - fp += offs; + int ofs = 3 * ((dl->type == DL_INDEX3) ? dl->nr : dl->parts * dl->nr); + memcpy(fp, dl->verts, sizeof(float) * ofs); + fp += ofs; } return allverts; @@ -889,9 +889,9 @@ static void displist_vert_coords_apply(ListBase *dispbase, float (*allverts)[3]) fp = (float *)allverts; LISTBASE_FOREACH (DispList *, dl, dispbase) { - int offs = 3 * ((dl->type == DL_INDEX3) ? dl->nr : dl->parts * dl->nr); - memcpy(dl->verts, fp, sizeof(float) * offs); - fp += offs; + int ofs = 3 * ((dl->type == DL_INDEX3) ? dl->nr : dl->parts * dl->nr); + memcpy(dl->verts, fp, sizeof(float) * ofs); + fp += ofs; } } diff --git a/source/blender/blenkernel/intern/particle_distribute.c b/source/blender/blenkernel/intern/particle_distribute.c index c3cc9136057..ad617b4198b 100644 --- a/source/blender/blenkernel/intern/particle_distribute.c +++ b/source/blender/blenkernel/intern/particle_distribute.c @@ -338,18 +338,18 @@ static void hammersley_create(float *out, int n, int seed, float amount) { RNG *rng; - double offs[2], t; + double ofs[2], t; rng = BLI_rng_new(31415926 + n + seed); - offs[0] = BLI_rng_get_double(rng) + (double)amount; - offs[1] = BLI_rng_get_double(rng) + (double)amount; + ofs[0] = BLI_rng_get_double(rng) + (double)amount; + ofs[1] = BLI_rng_get_double(rng) + (double)amount; BLI_rng_free(rng); for (int k = 0; k < n; k++) { BLI_hammersley_1d(k, &t); - out[2 * k + 0] = fmod((double)k / (double)n + offs[0], 1.0); - out[2 * k + 1] = fmod(t + offs[1], 1.0); + out[2 * k + 0] = fmod((double)k / (double)n + ofs[0], 1.0); + out[2 * k + 1] = fmod(t + ofs[1], 1.0); } } |