diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-04-05 16:36:18 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-04-05 16:50:17 +0400 |
commit | 45507319635a0351d3c5010d75c32e40bf211d25 (patch) | |
tree | 909a5c2cf0816630bbe166de46d8e23d573db09d /source/blender/makesrna/intern/rna_rna.c | |
parent | cb0520f79a7a2babd4c4a4f0d075c0d289b2a2f0 (diff) |
RNA: optimization to avoid malloc for iterators.
This mostly helps making Cycles scene synchronization a bit faster.
Diffstat (limited to 'source/blender/makesrna/intern/rna_rna.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 8d448f26bbe..8f2537105c1 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -253,7 +253,7 @@ static void rna_inheritance_functions_listbase_next(CollectionPropertyIterator * static void rna_Struct_properties_next(CollectionPropertyIterator *iter) { - ListBaseIterator *internal = iter->internal; + ListBaseIterator *internal = &iter->internal.listbase; IDProperty *group; if (internal->flag) { @@ -271,7 +271,7 @@ static void rna_Struct_properties_next(CollectionPropertyIterator *iter) if (group) { rna_iterator_listbase_end(iter); rna_iterator_listbase_begin(iter, &group->data.group, rna_idproperty_known); - internal = iter->internal; + internal = &iter->internal.listbase; internal->flag = 1; } } @@ -295,7 +295,7 @@ static void rna_Struct_properties_begin(CollectionPropertyIterator *iter, Pointe static PointerRNA rna_Struct_properties_get(CollectionPropertyIterator *iter) { - ListBaseIterator *internal = iter->internal; + ListBaseIterator *internal = &iter->internal.listbase; /* we return either PropertyRNA* or IDProperty*, the rna_access.c * functions can handle both as PropertyRNA* with some tricks */ @@ -324,7 +324,7 @@ static void rna_Struct_functions_begin(CollectionPropertyIterator *iter, Pointer static PointerRNA rna_Struct_functions_get(CollectionPropertyIterator *iter) { - ListBaseIterator *internal = iter->internal; + ListBaseIterator *internal = &iter->internal.listbase; /* we return either PropertyRNA* or IDProperty*, the rna_access.c * functions can handle both as PropertyRNA* with some tricks */ |