diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-01 16:47:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-01 16:57:59 +0300 |
commit | ddee0931b8687d01186f1941d483c6b3622d1833 (patch) | |
tree | afc6e71c703bc1bd7a941e7d3f2e4617f0be27e6 /source/blender/makesrna/intern/rna_wm.c | |
parent | 3ec6f2172d890972b46c26a72dd30122b697c101 (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/makesrna/intern/rna_wm.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 7c3674c8343..0de69b9729b 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -951,7 +951,7 @@ static int rna_operator_poll_cb(bContext *C, wmOperatorType *ot) ParameterList list; FunctionRNA *func; void *ret; - int visible; + bool visible; RNA_pointer_create(NULL, ot->ext.srna, NULL, &ptr); /* dummy */ func = &rna_Operator_poll_func; /* RNA_struct_find_function(&ptr, "poll"); */ @@ -961,7 +961,7 @@ static int rna_operator_poll_cb(bContext *C, wmOperatorType *ot) ot->ext.call(C, &ptr, func, &list); RNA_parameter_get_lookup(&list, "visible", &ret); - visible = *(int *)ret; + visible = *(bool *)ret; RNA_parameter_list_free(&list); @@ -1012,7 +1012,7 @@ static bool rna_operator_check_cb(bContext *C, wmOperator *op) op->type->ext.call(C, &opr, func, &list); RNA_parameter_get_lookup(&list, "result", &ret); - result = (*(int *)ret) != 0; + result = (*(bool *)ret) != 0; RNA_parameter_list_free(&list); |