There is a more recent implementation as a geometry node, but this code is used by RNA and Cycles still. In order to help understand the code to tell if it can be replaced this makes some small changes: - Use indexing instead of pointer incrementing - Add const to unchanged arguments - Avoid unnecessary indentation - Use references for expected non-null arguments