Blender Git Commit Log

Git Commits -> Revision cc6c527

Revision cc6c527 by Jacques Lucke (master)
August 14, 2020, 11:16 (GMT)
BLI: add reverse iterators, iterator constructor and Vector.insert/prepend

The new reverse iterators behave as the reverse iterators for contains from
the standard library. Have a look at the tests to see how to use them.
Using them will hopefully become easier with ranges in C++20.

A Vector can now be constructed from two iterators, which is very common
in the standard library.

New Vector.insert methods allow adding elements in the middle of a vector.
These methods should not be used often in practice, because they has a linear running time.

New Vector.prepend methods allow adding elements to the beginning of a vector.
These methods are O(n) as well.

Commit Details:

Full Hash: cc6c52768a9e6d5c82f35e953a6e53ece76d3a78
Parent Commit: 2d65336
Lines Changed: +252, -16

6 Modified Paths:

/source/blender/blenlib/BLI_array.hh (+18, -2) (Diff)
/source/blender/blenlib/BLI_span.hh (+18, -2) (Diff)
/source/blender/blenlib/BLI_vector.hh (+98, -10) (Diff)
/source/blender/blenlib/tests/BLI_array_test.cc (+15, -0) (Diff)
/source/blender/blenlib/tests/BLI_span_test.cc (+28, -0) (Diff)
/source/blender/blenlib/tests/BLI_vector_test.cc (+75, -2) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021