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>2014-01-27 20:52:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-27 21:00:04 +0400
commita5c35fb27f090bb716a3bb49a69a56be80dff6d3 (patch)
treec2486c0781d2135c00ee58c78c042ba9d4f87b97 /source/blender/windowmanager/intern/wm.c
parent60287e23b53a273aae56c42502278991dbeee9e7 (diff)
Code cleanup: use booleans where appropriate
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() */