Bastien Montagne
dd168a35c5
Refactor: Replace MEM_cnew with a type-aware template version of MEM_callocN.
...
The general idea is to keep the 'old', C-style MEM_callocN signature, and slowly
replace most of its usages with the new, C++-style type-safer template version.
* `MEM_cnew<T>` allocation version is renamed to `MEM_callocN<T>`.
* `MEM_cnew_array<T>` allocation version is renamed to `MEM_calloc_arrayN<T>`.
* `MEM_cnew<T>` duplicate version is renamed to `MEM_dupallocN<T>`.
Similar templates type-safe version of `MEM_mallocN` will be added soon
as well.
Following discussions in !134452 .
NOTE: For now static type checking in `MEM_callocN` and related are slightly
different for Windows MSVC. This compiler seems to consider structs using the
`DNA_DEFINE_CXX_METHODS` macro as non-trivial (likely because their default
copy constructors are deleted). So using checks on trivially
constructible/destructible instead on this compiler/system.
Pull Request: https://projects.blender.org/blender/blender/pulls/134771
2025-03-05 16:35:09 +01:00
..
2025-02-14 17:21:17 +01:00
2024-12-08 10:41:18 -05:00
2025-01-31 17:03:17 +01:00
2025-02-26 15:56:08 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2024-12-08 10:41:18 -05:00
2025-01-31 17:03:17 +01:00
2024-12-17 21:04:55 +01:00
2025-03-05 16:35:09 +01:00
2024-12-08 10:41:18 -05:00
2025-01-07 12:39:13 +01:00
2024-12-08 10:41:18 -05:00
2025-02-12 23:01:08 +01:00
2024-07-15 16:39:45 +02:00
2025-01-31 17:03:17 +01:00
2024-12-08 10:41:18 -05:00
2025-01-31 17:03:17 +01:00
2025-02-24 13:52:42 +01:00
2025-02-28 19:33:07 +01:00
2025-02-28 19:33:07 +01:00
2025-01-31 17:03:17 +01:00
2025-02-14 15:54:20 +01:00
2025-02-14 15:54:20 +01:00
2025-01-31 17:03:17 +01:00
2024-12-06 14:08:10 +01:00
2025-02-28 19:33:07 +01:00
2025-01-10 23:31:49 +01:00
2025-02-28 19:33:07 +01:00
2025-02-28 19:33:07 +01:00
2025-01-24 16:45:32 +01:00
2025-02-14 15:54:20 +01:00
2025-01-31 17:03:17 +01:00
2025-01-09 18:11:46 +01:00
2024-12-06 14:08:10 +01:00
2025-01-31 17:03:17 +01:00
2024-12-06 14:08:10 +01:00
2025-02-14 15:54:20 +01:00
2024-12-06 14:08:10 +01:00
2025-01-31 17:03:17 +01:00
2025-02-14 15:54:20 +01:00
2025-01-31 17:03:17 +01:00
2024-11-05 16:35:16 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2024-12-08 10:41:18 -05:00
2025-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2024-08-23 13:09:20 +10:00
2025-01-31 17:03:17 +01:00
2025-01-07 12:39:13 +01:00
2025-02-07 17:47:16 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2024-12-06 14:08:10 +01:00
2025-02-17 19:44:54 +01:00
2025-03-05 16:35:09 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 19:59:28 +01:00
2025-01-07 12:39:13 +01:00
2025-03-05 16:35:09 +01:00
2024-07-15 16:39:45 +02:00
2025-03-05 16:35:09 +01:00
2025-02-17 19:44:54 +01:00
2025-01-31 17:03:17 +01:00
2024-12-08 10:41:18 -05:00
2025-02-26 15:56:08 +01:00
2025-03-05 16:35:09 +01:00
2024-12-08 10:41:18 -05:00
2025-01-31 17:03:17 +01:00
2025-03-05 16:35:09 +01:00
2025-02-17 19:44:54 +01:00
2025-01-07 12:39:13 +01:00
2025-01-31 17:03:17 +01:00
2025-02-17 19:44:54 +01:00
2024-12-19 18:22:29 +01:00
2024-12-19 18:22:29 +01:00
2025-02-17 19:44:54 +01:00
2025-03-05 16:35:09 +01:00
2024-12-08 10:41:18 -05:00
2025-02-12 23:01:08 +01:00
2023-09-22 03:18:17 +02:00
2024-12-06 14:08:10 +01:00
2025-02-28 15:46:33 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2025-02-12 23:01:08 +01:00
2025-02-12 23:01:08 +01:00
2025-01-31 19:59:28 +01:00
2025-01-31 17:03:17 +01:00
2025-01-07 12:39:13 +01:00
2025-02-12 23:01:08 +01:00
2025-02-12 23:01:08 +01:00
2025-02-12 23:01:08 +01:00
2025-01-31 17:03:17 +01:00
2024-12-08 10:41:18 -05:00