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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-10-14 02:17:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-14 05:00:24 +0300
commit576142dc85c78ced792e3440a7665ea57e45a0cc (patch)
tree4b37d4897683f23a4f42ea476751cf9ed732e4de /source/blender/editors/animation/keyframing.c
parentc6e956bbb148b80cbe03d59198f8257062434cff (diff)
Cleanup: pass the sizeof(..) as the second arg for array allocation
By argument naming and convention this is the intended argument order.
Diffstat (limited to 'source/blender/editors/animation/keyframing.c')
-rw-r--r--source/blender/editors/animation/keyframing.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 95df8b69cd4..2c6b5cc594b 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -792,12 +792,12 @@ static float *setting_get_rna_values(
int *tmp_int;
if (length > buffer_size) {
- values = MEM_malloc_arrayN(sizeof(float), length, __func__);
+ values = MEM_malloc_arrayN(length, sizeof(float), __func__);
}
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
- tmp_bool = MEM_malloc_arrayN(sizeof(*tmp_bool), length, __func__);
+ tmp_bool = MEM_malloc_arrayN(length, sizeof(*tmp_bool), __func__);
RNA_property_boolean_get_array(ptr, prop, tmp_bool);
for (int i = 0; i < length; i++) {
values[i] = (float)tmp_bool[i];
@@ -805,7 +805,7 @@ static float *setting_get_rna_values(
MEM_freeN(tmp_bool);
break;
case PROP_INT:
- tmp_int = MEM_malloc_arrayN(sizeof(*tmp_int), length, __func__);
+ tmp_int = MEM_malloc_arrayN(length, sizeof(*tmp_int), __func__);
RNA_property_int_get_array(ptr, prop, tmp_int);
for (int i = 0; i < length; i++) {
values[i] = (float)tmp_int[i];