Cleanup: use listbase clear
This commit is contained in:
@@ -2546,7 +2546,8 @@ void BKE_curve_bevelList_free(ListBase *bev)
|
||||
}
|
||||
MEM_freeN(bl);
|
||||
}
|
||||
bev->first = bev->last = NULL;
|
||||
|
||||
BLI_listbase_clear(bev);
|
||||
}
|
||||
|
||||
void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render)
|
||||
|
||||
@@ -3449,7 +3449,7 @@ static void direct_link_image(FileData *fd, Image *ima)
|
||||
ima->packedfile = direct_link_packedfile(fd, ima->packedfile);
|
||||
}
|
||||
|
||||
ima->anims.first = ima->anims.last = NULL;
|
||||
BLI_listbase_clear(&ima->anims);
|
||||
ima->preview = direct_link_preview_image(fd, ima->preview);
|
||||
ima->stereo3d_format = newdataadr(fd, ima->stereo3d_format);
|
||||
ima->ok = 1;
|
||||
@@ -5408,7 +5408,7 @@ static void lib_link_scene(FileData *fd, Main *main)
|
||||
seq->scene_sound = BKE_sound_add_scene_sound_defaults(sce, seq);
|
||||
}
|
||||
}
|
||||
seq->anims.first = seq->anims.last = NULL;
|
||||
BLI_listbase_clear(&seq->anims);
|
||||
|
||||
lib_link_sequence_modifiers(fd, sce, &seq->modifiers);
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ void ED_gpencil_strokes_copybuf_free(void)
|
||||
BLI_freelinkN(&gp_strokes_copypastebuf, gps);
|
||||
}
|
||||
|
||||
gp_strokes_copypastebuf.first = gp_strokes_copypastebuf.last = NULL;
|
||||
BLI_listbase_clear(&gp_strokes_copypastebuf);
|
||||
}
|
||||
|
||||
/* --------------------- */
|
||||
|
||||
@@ -533,7 +533,7 @@ BlenderRNA *RNA_create(void)
|
||||
brna = MEM_callocN(sizeof(BlenderRNA), "BlenderRNA");
|
||||
|
||||
DefRNA.sdna = DNA_sdna_from_data(DNAstr, DNAlen, false);
|
||||
DefRNA.structs.first = DefRNA.structs.last = NULL;
|
||||
BLI_listbase_clear(&DefRNA.structs);
|
||||
DefRNA.error = 0;
|
||||
DefRNA.preprocess = 1;
|
||||
|
||||
@@ -720,8 +720,8 @@ StructRNA *RNA_def_struct_ptr(BlenderRNA *brna, const char *identifier, StructRN
|
||||
* use MEM_dupallocN, data structs may not be alloced but builtin */
|
||||
memcpy(srna, srnafrom, sizeof(StructRNA));
|
||||
srna->cont.prophash = NULL;
|
||||
srna->cont.properties.first = srna->cont.properties.last = NULL;
|
||||
srna->functions.first = srna->functions.last = NULL;
|
||||
BLI_listbase_clear(&srna->cont.properties);
|
||||
BLI_listbase_clear(&srna->functions);
|
||||
srna->py_type = NULL;
|
||||
|
||||
if (DefRNA.preprocess) {
|
||||
|
||||
@@ -2205,7 +2205,7 @@ static void free_all_freestyle_renders(void)
|
||||
/* detach the window manager from freestyle bmain (see comments
|
||||
* in add_freestyle() for more detail)
|
||||
*/
|
||||
re1->freestyle_bmain->wm.first = re1->freestyle_bmain->wm.last = NULL;
|
||||
BLI_listbase_clear(&re1->freestyle_bmain->wm);
|
||||
|
||||
BKE_main_free(re1->freestyle_bmain);
|
||||
re1->freestyle_bmain = NULL;
|
||||
|
||||
Reference in New Issue
Block a user