Remove unused bmain argument from BKE_libblock_free_data

This commit is contained in:
Sergey Sharybin 2017-06-14 11:16:34 +02:00
parent 97f9f90986
commit 20e5052a72
4 changed files with 6 additions and 7 deletions

View File

@ -68,7 +68,7 @@ void BKE_libblock_free(struct Main *bmain, void *idv) ATTR_NONNULL();
void BKE_libblock_free_datablock(struct ID *id) ATTR_NONNULL();
void BKE_libblock_free_ex(struct Main *bmain, void *idv, const bool do_id_user, const bool do_ui_user) ATTR_NONNULL();
void BKE_libblock_free_us(struct Main *bmain, void *idv) ATTR_NONNULL();
void BKE_libblock_free_data(struct Main *bmain, struct ID *id, const bool do_id_user) ATTR_NONNULL();
void BKE_libblock_free_data(struct ID *id, const bool do_id_user) ATTR_NONNULL();
void BKE_libblock_delete(struct Main *bmain, void *idv) ATTR_NONNULL();
void BKE_id_lib_local_paths(struct Main *bmain, struct Library *lib, struct ID *id);

View File

@ -723,7 +723,7 @@ void BKE_libblock_relink_to_newid(ID *id)
BKE_library_foreach_ID_link(NULL, id, id_relink_to_newid_looper, NULL, 0);
}
void BKE_libblock_free_data(Main *UNUSED(bmain), ID *id, const bool do_id_user)
void BKE_libblock_free_data(ID *id, const bool do_id_user)
{
if (id->properties) {
IDP_FreeProperty_ex(id->properties, do_id_user);
@ -882,7 +882,7 @@ void BKE_libblock_free_ex(Main *bmain, void *idv, const bool do_id_user, const b
BLI_remlink(lb, id);
BKE_libblock_free_data(bmain, id, do_id_user);
BKE_libblock_free_data(id, do_id_user);
BKE_main_unlock(bmain);
MEM_freeN(id);

View File

@ -1828,7 +1828,7 @@ void ntreeFreeTree(bNodeTree *ntree)
if (tntree == ntree)
break;
if (tntree == NULL) {
BKE_libblock_free_data(G.main, &ntree->id, true);
BKE_libblock_free_data(&ntree->id, true);
}
}

View File

@ -483,13 +483,12 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm)
void wm_close_and_free_all(bContext *C, ListBase *wmlist)
{
Main *bmain = CTX_data_main(C);
wmWindowManager *wm;
while ((wm = wmlist->first)) {
wm_close_and_free(C, wm);
BLI_remlink(wmlist, wm);
BKE_libblock_free_data(bmain, &wm->id, true);
BKE_libblock_free_data(&wm->id, true);
MEM_freeN(wm);
}
}