From fae6c35ca7ae4e73cc32a0f5c235fd0ff8f00be1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 4 Nov 2012 07:18:29 +0000 Subject: code cleanup: quiet -Wdouble-promotion, disabled this warnings for a few files since its done throughout the code in some places. --- source/blender/python/mathutils/mathutils_Matrix.c | 2 +- source/blender/python/mathutils/mathutils_Vector.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/python/mathutils') diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index ecc6437ceb5..b9f0ce9ad96 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -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; } diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index 4a6891c41b9..06d7f3fec51 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -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; } -- cgit v1.2.3