Cleanup: use const variables where possible in the Python API
This commit is contained in:
@@ -356,7 +356,7 @@ PyDoc_STRVAR(Vector_normalize_doc,
|
||||
" however 4D Vectors w axis is left untouched.\n");
|
||||
static PyObject *Vector_normalize(VectorObject *self)
|
||||
{
|
||||
int size = (self->size == 4 ? 3 : self->size);
|
||||
const int size = (self->size == 4 ? 3 : self->size);
|
||||
if (BaseMath_ReadCallback_ForWrite(self) == -1) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -2027,7 +2027,7 @@ static PyObject *Vector_richcmpr(PyObject *objectA, PyObject *objectB, int compa
|
||||
{
|
||||
VectorObject *vecA = NULL, *vecB = NULL;
|
||||
int result = 0;
|
||||
double epsilon = 0.000001f;
|
||||
const double epsilon = 0.000001f;
|
||||
double lenA, lenB;
|
||||
|
||||
if (!VectorObject_Check(objectA) || !VectorObject_Check(objectB)) {
|
||||
|
Reference in New Issue
Block a user