diff options
Diffstat (limited to 'source/blender/python/mathutils')
-rw-r--r-- | source/blender/python/mathutils/mathutils.c | 5 | ||||
-rw-r--r-- | source/blender/python/mathutils/mathutils_Euler.c | 4 | ||||
-rw-r--r-- | source/blender/python/mathutils/mathutils_Quaternion.c | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c index 7cba95a1f85..2bf608fd1d6 100644 --- a/source/blender/python/mathutils/mathutils.c +++ b/source/blender/python/mathutils/mathutils.c @@ -47,8 +47,7 @@ static int mathutils_array_parse_fast(float *array, i = size; do { i--; - if (((array[i] = PyFloat_AsDouble((item = value_fast_items[i]))) == -1.0f) && - PyErr_Occurred()) { + if (((array[i] = PyFloat_AsDouble(item = value_fast_items[i])) == -1.0f) && PyErr_Occurred()) { PyErr_Format(PyExc_TypeError, "%.200s: sequence index %d expected a number, " "found '%.200s' type, ", @@ -317,7 +316,7 @@ int mathutils_int_array_parse(int *array, int array_dim, PyObject *value, const i = size; while (i > 0) { i--; - if (((array[i] = PyC_Long_AsI32((item = value_fast_items[i]))) == -1) && PyErr_Occurred()) { + if (((array[i] = PyC_Long_AsI32(item = value_fast_items[i])) == -1) && PyErr_Occurred()) { PyErr_Format(PyExc_TypeError, "%.200s: sequence index %d expected an int", error_prefix, i); size = -1; break; diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c index 8f950bce344..78c98d8f482 100644 --- a/source/blender/python/mathutils/mathutils_Euler.c +++ b/source/blender/python/mathutils/mathutils_Euler.c @@ -32,10 +32,10 @@ static const char *euler_order_str(EulerObject *self) short euler_order_from_string(const char *str, const char *error_prefix) { - if ((str[0] && str[1] && str[2] && str[3] == '\0')) { + if (str[0] && str[1] && str[2] && str[3] == '\0') { #ifdef __LITTLE_ENDIAN__ -# define MAKE_ID3(a, b, c) (((a)) | ((b) << 8) | ((c) << 16)) +# define MAKE_ID3(a, b, c) ((a) | ((b) << 8) | ((c) << 16)) #else # define MAKE_ID3(a, b, c) (((a) << 24) | ((b) << 16) | ((c) << 8)) #endif diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c index d405d5e63ce..892f38d22ae 100644 --- a/source/blender/python/mathutils/mathutils_Quaternion.c +++ b/source/blender/python/mathutils/mathutils_Quaternion.c @@ -1177,7 +1177,7 @@ static PyObject *Quaternion_mul(PyObject *q1, PyObject *q2) } } else if (quat1) { /* QUAT * FLOAT */ - if ((((scalar = PyFloat_AsDouble(q2)) == -1.0f && PyErr_Occurred()) == 0)) { + if (((scalar = PyFloat_AsDouble(q2)) == -1.0f && PyErr_Occurred()) == 0) { return quat_mul_float(quat1, scalar); } } |