diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-02 02:39:34 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-02 02:39:34 +0400 |
commit | 3bbf11761a78e45be465f7ebb3a7e4dfc1f9b13b (patch) | |
tree | 0a2a627478e9259956ac16ee8a69cd13ff013c41 /source/blender/makesrna | |
parent | d7e835684687770bafe3584b6a2485d692deeb15 (diff) |
make rna layer access less cryptic by using ARRAY_HAS_ITEM(), modified this to use unsigned offset.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 9c2701d0dd4..ecdd0c949bd 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -153,7 +153,7 @@ static CustomData *rna_cd_from_layer(PointerRNA *ptr, CustomDataLayer *cdl) CustomData *cd; /* rely on negative values wrapping */ -#define TEST_CDL(cmd) if ((void)(cd = cmd(me)), (unsigned int)(cdl - cd->layers) < (unsigned int)cd->totlayer) return cd +#define TEST_CDL(cmd) if ((void)(cd = cmd(me)), ARRAY_HAS_ITEM(cdl, cd->layers, cd->totlayer)) return cd TEST_CDL(rna_mesh_vdata_helper); TEST_CDL(rna_mesh_edata_helper); |