Blender Git Loki
Git Commits -> Revision 5ed3a5d
Revision 5ed3a5d by Jesse Yurkovich (master) November 18, 2021, 22:32 (GMT) |
Cleanup: Add an empty() method to RNA's CollectionRef class The existing RNA CollectionRef class only offers a length() operation which is sometimes used for checking if the collection is empty. This is inefficient for certain collection types which do not have a native length member; the entire list is iterated to find the count. This patch creates an explicit empty() method to be used in such cases for better semantics. Additionally, many collection types will behave more efficiently when using the new method instead of checking length. Making use of the new method will follow separately. Differential Revision: https://developer.blender.org/D12314 |
Commit Details:
Full Hash: 5ed3a5d0237949411fe403c9a1cbb5a53a685f69
Parent Commit: 3f288e9
Lines Changed: +20, -2
1 Modified Path:
/source/blender/makesrna/intern/makesrna.c (+20, -2) (Diff)