Cleanup: various non-functional changes for C++ (python, windowmanager)

- Remove redundant void, struct.
- Use function style casts.
This commit is contained in:
Campbell Barton
2023-07-21 10:59:54 +10:00
parent ae5682fa10
commit b29a4cdcfc
87 changed files with 491 additions and 500 deletions

View File

@@ -81,7 +81,7 @@ static PyObject *Quaternion_to_tuple_ext(QuaternionObject *self, int ndigits)
if (ndigits >= 0) {
for (i = 0; i < QUAT_SIZE; i++) {
PyTuple_SET_ITEM(ret, i, PyFloat_FromDouble(double_round((double)self->quat[i], ndigits)));
PyTuple_SET_ITEM(ret, i, PyFloat_FromDouble(double_round(double(self->quat[i]), ndigits)));
}
}
else {
@@ -923,7 +923,7 @@ static int Quaternion_ass_item(QuaternionObject *self, Py_ssize_t i, PyObject *o
return -1;
}
f = (float)PyFloat_AsDouble(ob);
f = float(PyFloat_AsDouble(ob));
if (f == -1.0f && PyErr_Occurred()) { /* parsed item not a number */
PyErr_SetString(PyExc_TypeError,