[Bf-blender-cvs] [17f299c5d14] master: Cleanup: quiet cast warnings in recent commit
Campbell Barton
noreply at git.blender.org
Mon Aug 5 20:35:40 CEST 2019
Commit: 17f299c5d14f0435595afe51c4153ae4037bb81b
Author: Campbell Barton
Date: Tue Aug 6 04:34:54 2019 +1000
Branches: master
https://developer.blender.org/rB17f299c5d14f0435595afe51c4153ae4037bb81b
Cleanup: quiet cast warnings in recent commit
===================================================================
M source/blender/blenlib/intern/math_geom.c
===================================================================
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 6f71551d4a0..b4a96ff316a 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -4481,7 +4481,8 @@ void projmat_dimensions(const float projmat[4][4],
}
}
-/* Creates a projection matrix for a small region of the viewport.
+/**
+ * Creates a projection matrix for a small region of the viewport.
*
* \param projmat: Projection Matrix.
* \param win_size: Viewport Size.
@@ -4499,12 +4500,12 @@ void projmat_from_subregion(const float projmat[4][4],
float rect_width = (float)(x_max - x_min);
float rect_height = (float)(y_max - y_min);
- float x_fac = ((x_min + x_max) - win_size[0]) / rect_width;
- float y_fac = ((y_min + y_max) - win_size[1]) / rect_height;
+ float x_fac = (float)((x_min + x_max) - win_size[0]) / rect_width;
+ float y_fac = (float)((y_min + y_max) - win_size[1]) / rect_height;
copy_m4_m4(r_projmat, projmat);
- r_projmat[0][0] *= (win_size[0] / rect_width);
- r_projmat[1][1] *= (win_size[1] / rect_height);
+ r_projmat[0][0] *= (float)win_size[0] / rect_width;
+ r_projmat[1][1] *= (float)win_size[1] / rect_height;
#if 0 /* TODO: check if this is more efficient. */
r_projmat[2][0] -= x_fac * r_projmat[2][3];
More information about the Bf-blender-cvs
mailing list