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:
authorCampbell Barton <ideasman42@gmail.com>2015-11-23 03:27:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-11-23 09:40:10 +0300
commit2e348fd43ee2bc7285fe4461171d51f307dabf92 (patch)
tree7e12478710dc214033b2d3e724d48ab4e2b758b5 /source/blender/blenkernel/intern/pointcache.c
parentbc8504cb4c93eb3aac22222f62966c13560a2bf6 (diff)
Cleanup: shadowing (blenkernel)
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 9054ecc7c3f..4eb3af6bbcf 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -691,10 +691,10 @@ static int ptcache_smoke_read_old(PTCacheFile *pf, void *smoke_v)
SmokeDomainSettings *sds = smd->domain;
if (sds->fluid) {
- size_t res = sds->res[0]*sds->res[1]*sds->res[2];
+ const size_t res = sds->res[0] * sds->res[1] * sds->res[2];
+ const unsigned int out_len = (unsigned int)res * sizeof(float);
float dt, dx, *dens, *heat, *heatold, *vx, *vy, *vz;
unsigned char *obstacles;
- unsigned int out_len = (unsigned int)res * sizeof(float);
float *tmp_array = MEM_callocN(out_len, "Smoke old cache tmp");
int fluid_fields = smoke_get_data_flags(sds);
@@ -733,13 +733,10 @@ static int ptcache_smoke_read_old(PTCacheFile *pf, void *smoke_v)
MEM_freeN(tmp_array);
if (pf->data_types & (1<<BPHYS_DATA_SMOKE_HIGH) && sds->wt) {
- int res = sds->res[0]*sds->res[1]*sds->res[2];
int res_big, res_big_array[3];
- float *dens, *tcu, *tcv, *tcw;
- unsigned int out_len = sizeof(float)*(unsigned int)res;
+ float *tcu, *tcv, *tcw;
unsigned int out_len_big;
unsigned char *tmp_array_big;
-
smoke_turbulence_get_res(sds->wt, res_big_array);
res_big = res_big_array[0]*res_big_array[1]*res_big_array[2];
out_len_big = sizeof(float) * (unsigned int)res_big;