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
..
2024-04-03 10:22:05 +11:00
2025-03-05 16:35:09 +01:00
2025-02-13 13:33:09 +11:00
2025-02-12 23:01:08 +01:00
2025-02-13 13:33:09 +11:00
2025-01-31 17:03:17 +01:00
2025-02-19 22:52:55 +01:00
2023-11-07 15:42:52 +11:00
2023-08-16 09:51:37 +02:00
2025-01-31 17:03:17 +01:00
2025-02-12 23:01:08 +01:00
2025-03-05 16:35:09 +01:00
2025-02-13 13:33:09 +11:00
2023-08-16 09:51:37 +02:00
2025-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2024-09-26 21:13:39 +10:00
2025-01-31 17:03:17 +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-02-12 23:01:08 +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-01-07 12:39:13 +01: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-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2025-02-12 23:01:08 +01:00
2023-08-16 00:20:26 +10:00
2024-04-14 13:20:32 +02:00
2025-01-31 17:03:17 +01:00
2023-11-07 15:42:52 +11:00
2024-11-21 17:02:05 +01:00
2025-02-26 09:01:36 +11:00
2025-02-12 23:01:08 +01:00
2023-08-16 09:51:37 +02:00
2025-02-13 13:33:09 +11:00
2025-02-12 23:01:08 +01:00
2025-02-23 21:02:54 +11:00
2024-08-15 20:46:00 +10:00
2024-09-26 21:13:39 +10:00
2025-03-05 16:35:09 +01:00
2023-10-30 21:40:35 +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-02-12 23:01:08 +01:00
2023-08-16 00:20:26 +10:00
2024-10-15 11:02:22 +02:00
2023-08-16 00:20:26 +10:00
2025-03-05 16:35:09 +01:00
2025-02-13 13:33:09 +11:00
2024-02-19 15:59:59 +01:00
2024-02-02 19:55:06 +01:00
2023-11-07 15:42:52 +11:00
2023-08-16 00:20:26 +10:00
2025-01-31 17:03:17 +01:00
2025-02-19 17:23:37 +01:00
2024-08-13 20:26:55 +02:00
2025-02-13 13:33:09 +11: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-02-12 23:01:08 +01:00
2025-03-05 16:35:09 +01:00
2025-01-31 17:03:17 +01:00
2023-08-16 00:20:26 +10:00
2024-07-12 15:59:56 +02:00
2025-02-12 23:01:08 +01:00
2025-03-05 16:35:09 +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
2023-11-07 15:42:52 +11:00
2025-02-12 23:01:08 +01:00
2025-01-31 17:03:17 +01:00
2025-02-12 23:01:08 +01:00
2025-02-27 15:52:45 +01:00
2025-01-31 17:03:17 +01:00
2025-02-23 21:02:54 +11:00
2025-01-31 17:03:17 +01:00
2024-09-22 17:39:54 +02:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2025-02-06 14:29:09 +01:00
2025-01-31 17:03:17 +01:00
2024-05-31 10:58:19 +02:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2024-12-05 14:36:01 +01:00
2025-01-31 17:03:17 +01:00
2025-02-12 23:01:08 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2024-08-16 17:20:19 +02: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-02-12 23:01:08 +01:00
2025-01-31 17:03:17 +01:00
2024-09-12 20:28:35 +02:00
2023-11-27 16:10:43 +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-02-20 10:37:10 +01:00
2025-02-17 11:23:00 +01:00
2023-08-16 00:20:26 +10:00
2025-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2024-11-07 15:39:58 +01:00
2025-02-13 13:33:09 +11: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-03-05 16:35:09 +01:00
2024-11-01 12:16:38 +01:00
2025-03-05 16:35:09 +01:00
2025-02-13 13:33:09 +11:00
2025-01-29 12:12:27 +01:00
2025-01-27 16:38:06 +01:00
2025-02-12 23:01:08 +01:00
2025-03-05 16:35:09 +01:00
2025-03-05 16:35:09 +01:00
2024-11-08 23:17:36 +01:00
2025-02-13 13:33:09 +11:00
2024-11-13 13:39:49 +01:00
2025-02-13 13:33:09 +11:00
2025-02-14 17:29:48 +01:00
2025-01-02 12:21:56 +01:00
2023-08-16 00:20:26 +10:00
2024-09-26 21:13:39 +10:00
2024-06-10 18:11:41 +02:00
2025-02-13 10:28:39 +01:00
2025-02-13 13:33:09 +11:00
2025-01-31 17:03:17 +01:00
2024-02-20 15:20:11 +01:00
2025-02-20 11:24:34 +01:00
2023-11-07 15:42:52 +11:00
2023-11-07 15:42:52 +11:00
2025-02-13 13:33:09 +11: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