From da82269c58bd7ec1c0ebcb5e1433c731120ec389 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 19 Apr 2018 12:52:32 +0200 Subject: Cleanup: rename Icon.type -> id_type Confusing when adding non-id icons. --- source/blender/blenkernel/intern/icons.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel/intern/icons.c') diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c index 6aa00b2c97d..3ac8abd55f6 100644 --- a/source/blender/blenkernel/intern/icons.c +++ b/source/blender/blenkernel/intern/icons.c @@ -475,7 +475,7 @@ void BKE_icon_changed(const int icon_id) if (icon) { /* We *only* expect ID-tied icons here, not non-ID icon/preview! */ - BLI_assert(icon->type != 0); + BLI_assert(icon->id_type != 0); /* Do not enforce creation of previews for valid ID types using BKE_previewimg_id_ensure() here , * we only want to ensure *existing* preview images are properly tagged as changed/invalid, that's all. */ @@ -501,7 +501,7 @@ static int icon_id_ensure_create_icon(struct ID *id) new_icon = MEM_mallocN(sizeof(Icon), __func__); new_icon->obj = id; - new_icon->type = GS(id->name); + new_icon->id_type = GS(id->name); /* next two lines make sure image gets created */ new_icon->drawinfo = NULL; @@ -577,7 +577,7 @@ int BKE_icon_preview_ensure(ID *id, PreviewImage *preview) new_icon = MEM_mallocN(sizeof(Icon), __func__); new_icon->obj = preview; - new_icon->type = 0; /* Special, tags as non-ID icon/preview. */ + new_icon->id_type = 0; /* Special, tags as non-ID icon/preview. */ /* next two lines make sure image gets created */ new_icon->drawinfo = NULL; @@ -654,7 +654,7 @@ void BKE_icon_delete(const int icon_id) icon = BLI_ghash_popkey(gIcons, SET_INT_IN_POINTER(icon_id), NULL); if (icon) { - if (icon->type) { + if (icon->id_type != 0) { ((ID *)(icon->obj))->icon_id = 0; } else { -- cgit v1.2.3