Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-02-10BLI: improve various C++ data structuresJacques Lucke
The changes come from the `functions` branch, where I'm using these structures a lot. This also includes a new `BLI::Optional<T>` type, which is similar to `std::Optional<T>` which can be used when Blender starts using C++17.
2020-02-07BLI: add index_range method to some data structuresJacques Lucke
This can be used to iterate over all indices with less code.
2019-09-21Fix build error in debug build on macOSBrecht Van Lommel
NDEBUG is the standard define, not DEBUG.
2019-09-14BLI: speedup adding to VectorSet by removing a checkJacques Lucke
2019-09-14BLI: Improve forwarding semantics of some data structuresJacques Lucke
This makes it possible to use e.g. `std::unique_ptr` in a map.
2019-09-13Cleanup: use header guardsCampbell Barton
2019-09-13BLI: make more integer type conversions explicitJacques Lucke
2019-09-12BLI: new C++ ArrayRef, Vector, Stack, ... data structuresJacques Lucke
Many generic C++ data structures have been developed in the functions branch. This commit merges a first chunk of them into master. The following new data structures are included: Array: Owns a memory buffer with a fixed size. It is different from std::array in that the size is not part of the type. ArrayRef: References an array owned by someone else. All elements in the referenced array are considered to be const. This should be the preferred parameter type for functions that take arrays as input. MutableArrayRef: References an array owned by someone else. The elements in the referenced array can be changed. IndexRange: Specifies a continuous range of integers with a start and end index. IntrusiveListBaseWrapper: A utility class that allows iterating over ListBase instances where the prev and next pointer are stored in the objects directly. Stack: A stack implemented on top of a vector. Vector: An array that can grow dynamically. Allocators: Three allocator types are included that can be used by the container types to support different use cases. The Stack and Vector support small object optimization. So when the amount of elements in them is below a certain threshold, no memory allocation is performed. Additionally, most methods have unit tests. I'm merging this without normal code review, after I checked the code roughly with Sergey, and after we talked about it with Brecht.