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/makesdna/intern | |
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/makesdna/intern')
-rw-r--r-- | source/blender/makesdna/intern/dna_genfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index d8d29c9c812..9f29249c239 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -271,7 +271,7 @@ int DNA_struct_find_nr_ex(const SDNA *sdna, const char *str, unsigned int *index index_p = BLI_ghash_lookup_p(sdna->structs_map, str); if (index_p) { - a = GET_INT_FROM_POINTER(*index_p); + a = POINTER_AS_INT(*index_p); *index_last = a; } else { @@ -500,7 +500,7 @@ static bool init_structDNA( for (intptr_t nr = 0; nr < sdna->nr_structs; nr++) { sp = sdna->structs[nr]; - BLI_ghash_insert(sdna->structs_map, (void *)sdna->types[sp[0]], SET_INT_IN_POINTER(nr)); + BLI_ghash_insert(sdna->structs_map, (void *)sdna->types[sp[0]], POINTER_FROM_INT(nr)); } } #endif |