Cleanup: avoid confusing assignment
authorCampbell Barton <ideasman42@gmail.com>
Mon, 4 Sep 2017 04:23:39 +0000 (14:23 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 4 Sep 2017 04:35:35 +0000 (14:35 +1000)
source/blender/python/bmesh/bmesh_py_ops_call.c

index f3fe4ff29e4aa566199324cde50a56fc4e88c128..6598d402f7268edd2e2ed68a1e1e48caaffd5c9c 100644 (file)
@@ -200,12 +200,12 @@ static int bpy_slot_from_py(
                {
                        /* XXX - BMesh operator design is crappy here, operator slot should define matrix size,
                         * not the caller! */
-                       unsigned short size;
                        MatrixObject *pymat;
                        if (!Matrix_ParseAny(value, &pymat)) {
                                return -1;
                        }
-                       if (((size = pymat->num_col) != pymat->num_row) || (!ELEM(size, 3, 4))) {
+                       const ushort size = pymat->num_col;
+                       if ((size != pymat->num_row) || (!ELEM(size, 3, 4))) {
                                PyErr_Format(PyExc_TypeError,
                                             "%.200s: keyword \"%.200s\" expected a 3x3 or 4x4 matrix Matrix",
                                             opname, slot_name);