diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-09-19 05:05:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-09-19 05:12:21 +0300 |
commit | bb3ec3ebafbc2c0e5d8530148a433242e0adad30 (patch) | |
tree | d30aaa3df2d03f90f6e7749bdc075445a5642045 /source/blender/blenkernel/intern/particle_system.c | |
parent | 4c918efd44be11d47afc1efed684a15ad5579722 (diff) |
BLI_utildefines: rename pointer conversion macros
Terms get/set don't make much sense when casting values.
Name macros so the conversion is obvious,
use common prefix for easier completion.
- GET_INT_FROM_POINTER -> POINTER_AS_INT
- SET_INT_IN_POINTER -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER -> POINTER_FROM_UINT
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 353c75d63c6..6ae324df136 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -366,7 +366,7 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm_final, DerivedMesh *dm_deform for (i=0, node=nodedmelem; i<totdmelem; i++, node++) { int origindex_final; - node->link = SET_INT_IN_POINTER(i); + node->link = POINTER_FROM_INT(i); /* may be vertex or face origindex */ if (use_modifier_stack) { @@ -409,7 +409,7 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm_final, DerivedMesh *dm_deform else { if (psys->part->from == PART_FROM_VERT) { if (pa->num < totelem && nodearray[pa->num]) - pa->num_dmcache= GET_INT_FROM_POINTER(nodearray[pa->num]->link); + pa->num_dmcache= POINTER_AS_INT(nodearray[pa->num]->link); else pa->num_dmcache = DMCACHE_NOTFOUND; } @@ -1546,7 +1546,7 @@ static EdgeHash *sph_springhash_build(ParticleSystem *psys) springhash = BLI_edgehash_new_ex(__func__, psys->tot_fluidsprings); for (i=0, spring=psys->fluid_springs; i<psys->tot_fluidsprings; i++, spring++) - BLI_edgehash_insert(springhash, spring->particle_index[0], spring->particle_index[1], SET_INT_IN_POINTER(i+1)); + BLI_edgehash_insert(springhash, spring->particle_index[0], spring->particle_index[1], POINTER_FROM_INT(i+1)); return springhash; } @@ -1748,7 +1748,7 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa /* Viscoelastic spring force */ if (pfn->psys == psys[0] && fluid->flag & SPH_VISCOELASTIC_SPRINGS && springhash) { /* BLI_edgehash_lookup appears to be thread-safe. - z0r */ - spring_index = GET_INT_FROM_POINTER(BLI_edgehash_lookup(springhash, index, pfn->index)); + spring_index = POINTER_AS_INT(BLI_edgehash_lookup(springhash, index, pfn->index)); if (spring_index) { spring = psys[0]->fluid_springs + spring_index - 1; |