diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-04 23:54:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-04 23:59:34 +0300 |
commit | a297a6c444c7463295f0447a55a5f9542414529c (patch) | |
tree | 964875831032df99b2625c4748992c70ddb7231f /source/blender/makesrna/intern/rna_ui.c | |
parent | a5c4a44df67ed69844a433179629d861cf10f438 (diff) |
Cleanup: replace unnecessary MEM_callocN calls
Use MEM_mallocN when memory is immediately copied over.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index a7f0c8ff19c..778e65d3276 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -341,7 +341,7 @@ static StructRNA *rna_Panel_register(Main *bmain, } /* create a new panel type */ - pt = MEM_callocN(sizeof(PanelType), "python buttons panel"); + pt = MEM_mallocN(sizeof(PanelType), "python buttons panel"); memcpy(pt, &dummypt, sizeof(dummypt)); pt->ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, pt->idname, &RNA_Panel); @@ -775,7 +775,7 @@ static StructRNA *rna_Header_register(Main *bmain, } /* create a new header type */ - ht = MEM_callocN(sizeof(HeaderType), "python buttons header"); + ht = MEM_mallocN(sizeof(HeaderType), "python buttons header"); memcpy(ht, &dummyht, sizeof(dummyht)); ht->ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, ht->idname, &RNA_Header); |