code cleanup: quiet -Wdouble-promotion, disabled this warnings for a few files since its done throughout the code in some places.

This commit is contained in:
2012-11-04 07:18:29 +00:00
parent 89a454653e
commit fae6c35ca7
28 changed files with 98 additions and 80 deletions

View File

@@ -2008,7 +2008,7 @@ static PyObject *Matrix_mul(PyObject *m1, PyObject *m2)
for (row = 0; row < mat1->num_row; row++) {
double dot = 0.0f;
for (item = 0; item < mat1->num_col; item++) {
dot += MATRIX_ITEM(mat1, row, item) * MATRIX_ITEM(mat2, item, col);
dot += (double)(MATRIX_ITEM(mat1, row, item) * MATRIX_ITEM(mat2, item, col));
}
mat[(col * mat1->num_row) + row] = (float)dot;
}

View File

@@ -2713,7 +2713,7 @@ static int row_vector_multiplication(float r_vec[MAX_DIMENSIONS], VectorObject *
for (col = 0; col < mat->num_col; col++) {
double dot = 0.0;
for (row = 0; row < mat->num_row; row++) {
dot += MATRIX_ITEM(mat, row, col) * vec_cpy[row];
dot += (double)(MATRIX_ITEM(mat, row, col) * vec_cpy[row]);
}
r_vec[z++] = (float)dot;
}