diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-04-12 04:26:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-04-12 04:26:06 +0300 |
commit | 4a64b36029872034c9c138738010ced47b48e045 (patch) | |
tree | 4880dd52734a808c94cb74f69cc7a58a2855c584 /source/blender/python/intern | |
parent | a2db16ba58a16be246f7f018ee78918d9c8a8aff (diff) |
Cleanup: use bool
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy_props.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 12 |
2 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index ce9b3e754ac..bce1d923462 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -1314,7 +1314,7 @@ static int icon_id_from_name(const char *name) return 0; } -static EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, int *defvalue, const short is_enum_flag) +static EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, int *defvalue, const bool is_enum_flag) { EnumPropertyItem *items; PyObject *item; diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 75490a18ab0..33ac58dadb1 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -7363,12 +7363,8 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param PointerRNA funcptr; int err = 0, i, ret_len = 0, arg_count; int flag = RNA_function_flag(func); - const char is_staticmethod = (flag & FUNC_NO_SELF) && !(flag & FUNC_USE_SELF_TYPE); - const char is_classmethod = (flag & FUNC_NO_SELF) && (flag & FUNC_USE_SELF_TYPE); - - /* annoying!, need to check if the screen gets set to NULL which is a - * hint that the file was actually re-loaded. */ - char is_valid_wm; + const bool is_staticmethod = (flag & FUNC_NO_SELF) && !(flag & FUNC_USE_SELF_TYPE); + const bool is_classmethod = (flag & FUNC_NO_SELF) && (flag & FUNC_USE_SELF_TYPE); PropertyRNA *pret_single = NULL; void *retdata_single = NULL; @@ -7395,7 +7391,9 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param if (C == NULL) C = BPy_GetContext(); - is_valid_wm = (CTX_wm_manager(C) != NULL); + /* annoying!, need to check if the screen gets set to NULL which is a + * hint that the file was actually re-loaded. */ + const bool is_valid_wm = (CTX_wm_manager(C) != NULL); bpy_context_set(C, &gilstate); |