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-07-20BLI: add typedefs for containers that use raw allocatorsJacques Lucke
Those are useful when you have to create containers with static storage duration. If those would use Blender's guarded allocator, it would report memory leaks, that are not actually leaks.
2020-07-20Refactor: Update integer type usageJacques Lucke
This updates the usage of integer types in code I wrote according to our new style guides. Major changes: * Use signed instead of unsigned integers in many places. * C++ containers in blenlib use `int64_t` for size and indices now (instead of `uint`). * Hash values for C++ containers are 64 bit wide now (instead of 32 bit). I do hope that I broke no builds, but it is quite likely that some compiler reports slightly different errors. Please let me know when there are any errors. If the fix is small, feel free to commit it yourself. I compiled successfully on linux with gcc and on windows.
2020-07-08Cleanup: use c++17 helper variable templatesJacques Lucke
2020-07-07Cleanup: remove redundant commentsJacques Lucke
Searching in these files for "_as" will reveal a comment at the top, that explains what these methods are for. There is no need to duplicate that knowledge all over the place.
2020-07-03Cleanup: Use trailing underscore for non-public data membersJacques Lucke
This makes the code conform better with our style guide.
2020-06-29BLI: remove blender::Optional in favor of std::optionalJacques Lucke
`std::optional` can be used now, because we switched to C++17.
2020-06-25Cleanup: spellingCampbell Barton
2020-06-16BLI: fix Map.foreach_item methodJacques Lucke
2020-06-13Cleanup: spellingCampbell Barton
2020-06-11BLI: fix forwarding with incorrect typeJacques Lucke
2020-06-11BLI: don't pass const pointers to placement new operatorJacques Lucke
This resulted in compile errors.
2020-06-11BLI: fix printing name in print_stats methods of Map, Set and VectorSetJacques Lucke
2020-06-11BLI: make Map::Item and Map::MutableItem more accessibleJacques Lucke
This makes it easier to write range-for loops over all items in the map without using auto.
2020-06-10BLI: add Map.pop_default methodJacques Lucke
There is a nice use case for this in depsgraph code. Also I added some previously missing calls to std::move.
2020-06-10BLI: fix type forwarding in MapJacques Lucke
Without this change, the code might do an unwanted conversion.
2020-06-10BLI: add Map.pop_try methodJacques Lucke
I found this pattern in depsgraph code more than once.
2020-06-10BLI: update behavior of Map.lookup_or_addJacques Lucke
Previously, this function would expect a callback function as parameter. This behavior is now in Map.lookup_or_add_cb. The new version just takes the key and value directly.
2020-06-09BLI: put C++ data structures in "blender" namespace instead of "BLI"Jacques Lucke
We plan to use the "blender" namespace in other modules as well.
2020-06-09BLI: generally improve C++ data structuresJacques Lucke
The main focus here was to improve the docs significantly. Furthermore, I reimplemented `Set`, `Map` and `VectorSet`. They are now (usually) faster, simpler and more customizable. I also rewrote `Stack` to make it more efficient by avoiding unnecessary copies. Thanks to everyone who helped with constructive feedback. Approved by brecht and sybren. Differential Revision: https://developer.blender.org/D7931
2020-04-28BLI: add Map.lookup_or_add_default methodJacques Lucke
2020-04-28BLI: add Map.is_empty() methodJacques Lucke
2020-04-24BLI: Implement StringMap.add and StringMap.add_or_modifyJacques Lucke
2020-04-23BLI: various data structure improvementsJacques Lucke
* Rename template parameter N to InlineBufferCapacity * Expose InlineBufferCapacity parameter for Set and Map * Add some comments * Fixed an error that I introduced recently
2020-04-21BLI: Use .hh extension for C++ headers in blenlibJacques Lucke