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-09-19 05:14:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-19 05:14:36 +0300
commitf35e9f047a0381732a41ec331945b7a0654ee578 (patch)
tree5be3c632483cf2bc2960b21789849af27c9b2b59 /source/blender/blenkernel/intern/icons.c
parent0ad183bf0289c3b9b1af0cd581bc30435cae3800 (diff)
parentbb3ec3ebafbc2c0e5d8530148a433242e0adad30 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern/icons.c')
-rw-r--r--source/blender/blenkernel/intern/icons.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c
index 23cb6c71696..2a348751365 100644
--- a/source/blender/blenkernel/intern/icons.c
+++ b/source/blender/blenkernel/intern/icons.c
@@ -157,7 +157,7 @@ static int get_next_free_id(void)
return gNextIconId++;
/* now we try to find the smallest icon id not stored in the gIcons hash */
- while (BLI_ghash_lookup(gIcons, SET_INT_IN_POINTER(startId)) && startId >= gFirstIconId)
+ while (BLI_ghash_lookup(gIcons, POINTER_FROM_INT(startId)) && startId >= gFirstIconId)
startId++;
/* if we found a suitable one that isn't used yet, return it */
@@ -211,7 +211,7 @@ void BKE_icons_deferred_free(void)
node != NULL;
node = node->next)
{
- BLI_ghash_remove(gIcons, SET_INT_IN_POINTER(node->icon_id), NULL, icon_free);
+ BLI_ghash_remove(gIcons, POINTER_FROM_INT(node->icon_id), NULL, icon_free);
}
BLI_linklist_lockfree_clear(&g_icon_delete_queue, MEM_freeN);
}
@@ -522,7 +522,7 @@ void BKE_icon_changed(const int icon_id)
if (!icon_id || G.background) return;
- icon = BLI_ghash_lookup(gIcons, SET_INT_IN_POINTER(icon_id));
+ icon = BLI_ghash_lookup(gIcons, POINTER_FROM_INT(icon_id));
if (icon) {
/* We *only* expect ID-tied icons here, not non-ID icon/preview! */
@@ -557,7 +557,7 @@ static Icon *icon_create(int icon_id, int obj_type, void *obj)
new_icon->drawinfo = NULL;
new_icon->drawinfo_free = NULL;
- BLI_ghash_insert(gIcons, SET_INT_IN_POINTER(icon_id), new_icon);
+ BLI_ghash_insert(gIcons, POINTER_FROM_INT(icon_id), new_icon);
return new_icon;
}
@@ -687,7 +687,7 @@ Icon *BKE_icon_get(const int icon_id)
Icon *icon = NULL;
- icon = BLI_ghash_lookup(gIcons, SET_INT_IN_POINTER(icon_id));
+ icon = BLI_ghash_lookup(gIcons, POINTER_FROM_INT(icon_id));
if (!icon) {
printf("%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id);
@@ -703,7 +703,7 @@ void BKE_icon_set(const int icon_id, struct Icon *icon)
void **val_p;
- if (BLI_ghash_ensure_p(gIcons, SET_INT_IN_POINTER(icon_id), &val_p)) {
+ if (BLI_ghash_ensure_p(gIcons, POINTER_FROM_INT(icon_id), &val_p)) {
printf("%s: Internal error, icon already set: %d\n", __func__, icon_id);
return;
}
@@ -732,7 +732,7 @@ void BKE_icon_id_delete(struct ID *id)
}
BKE_icons_deferred_free();
- BLI_ghash_remove(gIcons, SET_INT_IN_POINTER(icon_id), NULL, icon_free);
+ BLI_ghash_remove(gIcons, POINTER_FROM_INT(icon_id), NULL, icon_free);
}
/**
@@ -745,7 +745,7 @@ bool BKE_icon_delete(const int icon_id)
return false;
}
- Icon *icon = BLI_ghash_popkey(gIcons, SET_INT_IN_POINTER(icon_id), NULL);
+ Icon *icon = BLI_ghash_popkey(gIcons, POINTER_FROM_INT(icon_id), NULL);
if (icon) {
icon_free_data(icon_id, icon);
icon_free(icon);
@@ -763,10 +763,10 @@ bool BKE_icon_delete_unmanaged(const int icon_id)
return false;
}
- Icon *icon = BLI_ghash_popkey(gIcons, SET_INT_IN_POINTER(icon_id), NULL);
+ Icon *icon = BLI_ghash_popkey(gIcons, POINTER_FROM_INT(icon_id), NULL);
if (icon) {
if (UNLIKELY(icon->flag & ICON_FLAG_MANAGED)) {
- BLI_ghash_insert(gIcons, SET_INT_IN_POINTER(icon_id), icon);
+ BLI_ghash_insert(gIcons, POINTER_FROM_INT(icon_id), icon);
return false;
}
else {