diff options
author | Campbell Barton <campbell@blender.org> | 2022-10-07 14:52:53 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-10-07 14:55:03 +0300 |
commit | 331f8500569df9b3b2aa776c5bcaad7b99c57295 (patch) | |
tree | 93547846177ff3415f9564ca54cb8f13433755cf /source/blender/python/intern | |
parent | 11abeae99fdbfc8f047c4a3c1d2b9b8c47883516 (diff) |
Cleanup: redundant parenthesis
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy_interface_run.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_msgbus.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 14 |
3 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/python/intern/bpy_interface_run.c b/source/blender/python/intern/bpy_interface_run.c index 886f5ee278d..49f5261ba19 100644 --- a/source/blender/python/intern/bpy_interface_run.c +++ b/source/blender/python/intern/bpy_interface_run.c @@ -259,7 +259,7 @@ static bool bpy_run_string_impl(bContext *C, py_dict = PyC_DefaultNameSpace("<blender string>"); - if (imports && (!PyC_NameSpace_ImportArray(py_dict, imports))) { + if (imports && !PyC_NameSpace_ImportArray(py_dict, imports)) { Py_DECREF(py_dict); retval = NULL; } diff --git a/source/blender/python/intern/bpy_msgbus.c b/source/blender/python/intern/bpy_msgbus.c index 32519e5e373..4e41c44cab4 100644 --- a/source/blender/python/intern/bpy_msgbus.c +++ b/source/blender/python/intern/bpy_msgbus.c @@ -265,7 +265,7 @@ static PyObject *bpy_msgbus_subscribe_rna(PyObject *UNUSED(self), PyObject *args } if (py_options && - (pyrna_enum_bitfield_from_set(py_options_enum, py_options, &options, error_prefix)) == -1) { + (pyrna_enum_bitfield_from_set(py_options_enum, py_options, &options, error_prefix) == -1)) { return NULL; } diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 56ad05d5501..0eaa5d6b6c7 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -1811,7 +1811,7 @@ static int pyrna_py_to_prop( * 'self.properties -> self' * class mixing. If this causes problems in the future it should be removed. */ - if ((ptr_type == &RNA_AnyType) && (BPy_StructRNA_Check(value))) { + if ((ptr_type == &RNA_AnyType) && BPy_StructRNA_Check(value)) { const StructRNA *base_type = RNA_struct_base_child_of( ((const BPy_StructRNA *)value)->ptr.type, NULL); if (ELEM(base_type, &RNA_Operator, &RNA_Gizmo)) { @@ -1957,7 +1957,7 @@ static int pyrna_py_to_prop( BKE_reports_init(&reports, RPT_STORE); RNA_property_pointer_set( ptr, prop, (param == NULL) ? PointerRNA_NULL : param->ptr, &reports); - const int err = (BPy_reports_to_error(&reports, PyExc_RuntimeError, true)); + const int err = BPy_reports_to_error(&reports, PyExc_RuntimeError, true); if (err == -1) { Py_XDECREF(value_new); return -1; @@ -2479,7 +2479,7 @@ static int pyrna_prop_collection_subscript_str_lib_pair_ptr(BPy_PropertyRNA *sel RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop) { ID *id = itemptr.data; /* Always an ID. */ - if (id->lib == lib && (STREQLEN(keyname, id->name + 2, sizeof(id->name) - 2))) { + if (id->lib == lib && STREQLEN(keyname, id->name + 2, sizeof(id->name) - 2)) { found = true; if (r_ptr) { *r_ptr = itemptr; @@ -5574,7 +5574,7 @@ static PyObject *pyprop_array_foreach_getset(BPy_PropertyArrayRNA *self, } else { const char f = buf.format ? buf.format[0] : 0; - if ((prop_type == PROP_INT && (buf.itemsize != sizeof(int) || (!ELEM(f, 'l', 'i')))) || + if ((prop_type == PROP_INT && (buf.itemsize != sizeof(int) || !ELEM(f, 'l', 'i'))) || (prop_type == PROP_FLOAT && (buf.itemsize != sizeof(float) || f != 'f'))) { PyBuffer_Release(&buf); PyErr_Format(PyExc_TypeError, "incorrect sequence item type: %s", buf.format); @@ -6404,7 +6404,7 @@ static PyObject *pyrna_func_call(BPy_FunctionRNA *self, PyObject *args, PyObject BKE_reports_init(&reports, RPT_STORE); RNA_function_call(C, &reports, self_ptr, self_func, &parms); - err = (BPy_reports_to_error(&reports, PyExc_RuntimeError, true)); + err = BPy_reports_to_error(&reports, PyExc_RuntimeError, true); /* Return value. */ if (err != -1) { @@ -7668,7 +7668,7 @@ bool pyrna_id_FromPyObject(PyObject *obj, ID **id) bool pyrna_id_CheckPyObject(PyObject *obj) { - return BPy_StructRNA_Check(obj) && (RNA_struct_is_ID(((BPy_StructRNA *)obj)->ptr.type)); + return BPy_StructRNA_Check(obj) && RNA_struct_is_ID(((BPy_StructRNA *)obj)->ptr.type); } void BPY_rna_init(void) @@ -8796,7 +8796,7 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param ReportList *reports; /* Alert the user, else they won't know unless they see the console. */ if ((!is_staticmethod) && (!is_classmethod) && (ptr->data) && - (RNA_struct_is_a(ptr->type, &RNA_Operator)) && + RNA_struct_is_a(ptr->type, &RNA_Operator) && (is_valid_wm == (CTX_wm_manager(C) != NULL))) { wmOperator *op = ptr->data; reports = op->reports; |