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:
authorLukas Tönne <lukas.toenne@gmail.com>2016-02-08 12:13:09 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2016-02-08 12:13:09 +0300
commitd8163a08fb62903257878ae1bdbb3c0ba5b8e773 (patch)
tree739475451e476e4c924c1897b4ec5488f0702056 /source/blender/makesrna/intern/rna_rna.c
parentdc2a01ca059d160f748064167200f275cede40a7 (diff)
Fix for non-bool return values of a few common RNA functions with declared boolean return.
Since rBbbc7dc169dc365889bad3f3aed7b868efb432710 bool-valued RNA functions are expected to return only 0 or 1. For flag tests as in these functions the returned int value needs to be explicitly converted to bool.
Diffstat (limited to 'source/blender/makesrna/intern/rna_rna.c')
-rw-r--r--source/blender/makesrna/intern/rna_rna.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 978738b36ac..382258ff751 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -952,13 +952,13 @@ static void rna_Function_parameters_begin(CollectionPropertyIterator *iter, Poin
static int rna_Function_registered_get(PointerRNA *ptr)
{
FunctionRNA *func = (FunctionRNA *)ptr->data;
- return func->flag & FUNC_REGISTER;
+ return 0 != (func->flag & FUNC_REGISTER);
}
static int rna_Function_registered_optional_get(PointerRNA *ptr)
{
FunctionRNA *func = (FunctionRNA *)ptr->data;
- return func->flag & (FUNC_REGISTER_OPTIONAL & ~FUNC_REGISTER);
+ return 0 != (func->flag & (FUNC_REGISTER_OPTIONAL & ~FUNC_REGISTER));
}
static int rna_Function_no_self_get(PointerRNA *ptr)
@@ -970,7 +970,7 @@ static int rna_Function_no_self_get(PointerRNA *ptr)
static int rna_Function_use_self_type_get(PointerRNA *ptr)
{
FunctionRNA *func = (FunctionRNA *)ptr->data;
- return (func->flag & FUNC_USE_SELF_TYPE);
+ return 0 != (func->flag & FUNC_USE_SELF_TYPE);
}
/* Blender RNA */