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>2018-04-19 13:52:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-19 13:52:32 +0300
commitda82269c58bd7ec1c0ebcb5e1433c731120ec389 (patch)
treed061121ad00e7bd76cd5b299f15e7dfcdbc6c068 /source/blender/blenkernel/intern/icons.c
parent63225d7c8b3a45e8189476d537585b011993fb17 (diff)
Cleanup: rename Icon.type -> id_type
Confusing when adding non-id icons.
Diffstat (limited to 'source/blender/blenkernel/intern/icons.c')
-rw-r--r--source/blender/blenkernel/intern/icons.c8
1 files changed, 4 insertions, 4 deletions
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 {