Bastien Montagne
78969aaff8
Cleanup: nodes: Replace 'void' MEM_[cm]allocN with templated, type-safe MEM_[cm]allocN<T>.
...
The main issue of 'type-less' standard C allocations is that there is no check on
allocated type possible.
This is a serious source of annoyance (and crashes) when making some
low-level structs non-trivial, as tracking down all usages of these
structs in higher-level other structs and their allocation is... really
painful.
MEM_[cm]allocN<T> templates on the other hand do check that the
given type is trivial, at build time (static assert), which makes such issue...
trivial to catch.
NOTE: New code should strive to use MEM_new (i.e. allocation and
construction) as much as possible, even for trivial PoD types.
Pull Request: https://projects.blender.org/blender/blender/pulls/135855
2025-03-12 12:15:33 +01:00
..
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-03-05 16:35:09 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-03-12 12:15:33 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-03-05 16:35:09 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-27 14:51:24 +02:00
2025-02-27 14:51:24 +02:00
2025-02-19 13:44:11 +01:00
2025-02-27 14:51:24 +02:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-03-05 16:35:09 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-03-05 16:35:09 +01:00
2025-02-19 13:44:11 +01:00
2025-02-27 14:51:24 +02:00
2025-02-27 14:51:24 +02:00
2025-02-19 13:44:11 +01:00
2025-03-10 09:36:44 +01:00
2025-03-05 16:35:09 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-03-05 16:35:09 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2025-02-19 13:44:11 +01:00
2025-02-27 14:51:24 +02:00
2025-02-27 14:51:24 +02:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2025-02-19 13:44:11 +01:00
2025-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2025-03-12 12:15:33 +01:00
2025-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2025-02-27 14:51:24 +02:00
2025-02-19 13:44:11 +01:00
2025-03-05 16:35:09 +01:00
2025-02-27 14:51:24 +02:00
2025-02-19 13:44:11 +01:00
2025-02-27 14:51:24 +02:00
2025-02-27 14:51:24 +02:00
2025-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2025-02-19 13:44:11 +01:00
2025-02-19 13:44:11 +01:00
2025-03-12 12:15:33 +01:00
2025-02-19 13:44:11 +01:00
2025-03-12 12:15:33 +01:00
2025-02-19 13:44:11 +01:00