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-07-01 16:47:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-01 16:57:59 +0300
commitddee0931b8687d01186f1941d483c6b3622d1833 (patch)
treeafc6e71c703bc1bd7a941e7d3f2e4617f0be27e6 /source/blender/editors/interface/interface_layout.c
parent3ec6f2172d890972b46c26a72dd30122b697c101 (diff)
RNA: use bool for boolean RNA types
We were using int's for bool arguments in BKE, just to avoid having wrapper functions.
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r--source/blender/editors/interface/interface_layout.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 1ff458e743f..d7a892e0e01 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -351,7 +351,7 @@ static int ui_layout_local_dir(uiLayout *layout)
}
}
-static uiLayout *ui_item_local_sublayout(uiLayout *test, uiLayout *layout, int align)
+static uiLayout *ui_item_local_sublayout(uiLayout *test, uiLayout *layout, bool align)
{
uiLayout *sub;
@@ -521,7 +521,7 @@ static void ui_item_array(
uiDefAutoButR(block, ptr, prop, -1, "", ICON_NONE, 0, 0, w, UI_UNIT_Y);
}
else {
- int *boolarr = NULL;
+ bool *boolarr = NULL;
/* even if 'expand' is fale, expanding anyway */
@@ -536,7 +536,7 @@ static void ui_item_array(
/* show checkboxes for rna on a non-emboss block (menu for eg) */
if (type == PROP_BOOLEAN && ELEM(layout->root->block->dt, UI_EMBOSS_NONE, UI_EMBOSS_PULLDOWN)) {
- boolarr = MEM_callocN(sizeof(int) * len, __func__);
+ boolarr = MEM_callocN(sizeof(bool) * len, __func__);
RNA_property_boolean_get_array(ptr, prop, boolarr);
}
@@ -2859,7 +2859,7 @@ static void ui_litem_layout_overlap(uiLayout *litem)
}
/* layout create functions */
-uiLayout *uiLayoutRow(uiLayout *layout, int align)
+uiLayout *uiLayoutRow(uiLayout *layout, bool align)
{
uiLayout *litem;
@@ -2880,7 +2880,7 @@ uiLayout *uiLayoutRow(uiLayout *layout, int align)
return litem;
}
-uiLayout *uiLayoutColumn(uiLayout *layout, int align)
+uiLayout *uiLayoutColumn(uiLayout *layout, bool align)
{
uiLayout *litem;
@@ -2901,7 +2901,7 @@ uiLayout *uiLayoutColumn(uiLayout *layout, int align)
return litem;
}
-uiLayout *uiLayoutColumnFlow(uiLayout *layout, int number, int align)
+uiLayout *uiLayoutColumnFlow(uiLayout *layout, int number, bool align)
{
uiLayoutItemFlow *flow;
@@ -3023,7 +3023,7 @@ uiLayout *uiLayoutListBox(
return (uiLayout *)box;
}
-uiLayout *uiLayoutAbsolute(uiLayout *layout, int align)
+uiLayout *uiLayoutAbsolute(uiLayout *layout, bool align)
{
uiLayout *litem;
@@ -3070,7 +3070,7 @@ uiLayout *uiLayoutOverlap(uiLayout *layout)
return litem;
}
-uiLayout *uiLayoutSplit(uiLayout *layout, float percentage, int align)
+uiLayout *uiLayoutSplit(uiLayout *layout, float percentage, bool align)
{
uiLayoutItemSplit *split;