From bb3ec3ebafbc2c0e5d8530148a433242e0adad30 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 19 Sep 2018 12:05:58 +1000 Subject: 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 --- source/blender/makesdna/intern/dna_genfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna/intern') 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 -- cgit v1.2.3