Age | Commit message (Collapse) | Author |
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
Sometimes it is useful to find the key that compares equal
to a known key. Typically that happens when the key itself
has additional data attached that is not part of its hash.
Note that the returned key reference/pointer is const, because
the caller must not change the key in a way that changes its
hash or how it compares to other keys.
|
|
While it was technically safe to call Map.remove while iterating over
a map, it wasn't really designed to work. Also it wasn't very efficient,
because to remove the element, the map would have to search it
again. Now it is possible to remove an element given an iterator
into the map. It is safe to remove the element while iterating over
the map. Obviously, the removed element must not be accessed
anymore after it has been removed.
|
|
This allows us to build more complex values in-place in the map.
Before those values had to be build separately and then moved into the map.
Existing calls to the Map API remain unchanged.
|
|
Some generic algorithms from the standard library like `std::any_of`
did not work with all container and iterator types. To improve the
situation, this patch adds various type members to containers
and iterators.
Custom iterators for Set, Map and IndexRange now have an iterator
category, which soe algorithms require. IndexRange could become
a random access iterator, but adding all the missing methods can
be done when it is necessary.
|
|
This avoids some boilerplate code that was necessary when using enums
as keys in maps or sets.
|
|
Mistakes added in 3cb4c513080ebeead7c5629a7f0503fae9513803 and
bec1765340c3c13f002882ce147762e4c38ed2c6
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9514
|
|
|
|
The is necessary when Map.add_or_modify is called with callbacks that
return a reference.
|
|
|
|
For more information see rB2aff45146f1464ba8899368ad004522cb6a1a98c.
|
|
Reviewers: sybren
Differential Revision: https://developer.blender.org/D8315
|