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:
Diffstat (limited to 'source/blender/windowmanager/intern/wm.c')
-rw-r--r--source/blender/windowmanager/intern/wm.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index 6a91eca2c7f..4460a1167ff 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -230,7 +230,7 @@ uiListType *WM_uilisttype_find(const char *idname, bool quiet)
return NULL;
}
-int WM_uilisttype_add(uiListType *ult)
+bool WM_uilisttype_add(uiListType *ult)
{
BLI_ghash_insert(uilisttypes_hash, (void *)ult->idname, ult);
return 1;
@@ -238,7 +238,12 @@ int WM_uilisttype_add(uiListType *ult)
void WM_uilisttype_freelink(uiListType *ult)
{
- BLI_ghash_remove(uilisttypes_hash, ult->idname, NULL, MEM_freeN);
+ bool ok;
+
+ ok = BLI_ghash_remove(uilisttypes_hash, ult->idname, NULL, MEM_freeN);
+
+ BLI_assert(ok);
+ (void)ok;
}
/* called on initialize WM_init() */
@@ -283,15 +288,20 @@ MenuType *WM_menutype_find(const char *idname, bool quiet)
return NULL;
}
-int WM_menutype_add(MenuType *mt)
+bool WM_menutype_add(MenuType *mt)
{
BLI_ghash_insert(menutypes_hash, (void *)mt->idname, mt);
- return 1;
+ return true;
}
void WM_menutype_freelink(MenuType *mt)
{
- BLI_ghash_remove(menutypes_hash, mt->idname, NULL, MEM_freeN);
+ bool ok;
+
+ ok = BLI_ghash_remove(menutypes_hash, mt->idname, NULL, MEM_freeN);
+
+ BLI_assert(ok);
+ (void)ok;
}
/* called on initialize WM_init() */