[PATCH 2/2] ddraw: Fix double to float conversion warnings

Henri Verbeet hverbeet at gmail.com
Thu Aug 1 07:29:04 CDT 2013


On 1 August 2013 12:25, Stefan Dösinger <stefan at codeweavers.com> wrote:
> diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c
> index 2925cfa..5c12272 100644
> --- a/dlls/ddraw/executebuffer.c
> +++ b/dlls/ddraw/executebuffer.c
> @@ -382,10 +382,10 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
>                             dst->u8.tv  = src->u8.tv;
>
>                             /* Now, the matrix multiplication */
> -                           dst->u1.sx = (src->u1.x * mat._11) + (src->u2.y * mat._21) + (src->u3.z * mat._31) + (1.0 * mat._41);
> -                           dst->u2.sy = (src->u1.x * mat._12) + (src->u2.y * mat._22) + (src->u3.z * mat._32) + (1.0 * mat._42);
> -                           dst->u3.sz = (src->u1.x * mat._13) + (src->u2.y * mat._23) + (src->u3.z * mat._33) + (1.0 * mat._43);
> -                           dst->u4.rhw = (src->u1.x * mat._14) + (src->u2.y * mat._24) + (src->u3.z * mat._34) + (1.0 * mat._44);
> +                           dst->u1.sx = (src->u1.x * mat._11) + (src->u2.y * mat._21) + (src->u3.z * mat._31) + (1.0f * mat._41);
> +                           dst->u2.sy = (src->u1.x * mat._12) + (src->u2.y * mat._22) + (src->u3.z * mat._32) + (1.0f * mat._42);
> +                           dst->u3.sz = (src->u1.x * mat._13) + (src->u2.y * mat._23) + (src->u3.z * mat._33) + (1.0f * mat._43);
> +                           dst->u4.rhw = (src->u1.x * mat._14) + (src->u2.y * mat._24) + (src->u3.z * mat._34) + (1.0f * mat._44);
>

I get where the 1.0f comes from, but I think you might as well just
remove the multiplication completely. And please get rid of the tabs
if you're resending anyway.



More information about the wine-devel mailing list