[Mesa-dev] [PATCH 11/11] glsl: add cast to silence MSVC double->float assignment warning

Jose Fonseca jfonseca at vmware.com
Wed Jan 23 05:43:16 PST 2013


Looks good AFAICT.

Reviewed-by: Jose Fonseca <jfonseca at vmware.com>

----- Original Message -----
> ---
>  src/glsl/s_expression.cpp |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/glsl/s_expression.cpp b/src/glsl/s_expression.cpp
> index 57de9d3..52fa7ae 100644
> --- a/src/glsl/s_expression.cpp
> +++ b/src/glsl/s_expression.cpp
> @@ -79,7 +79,7 @@ read_atom(void *ctx, const char *&src, char
> *&symbol_buffer)
>           int i = strtol(src, &int_end, 10);
>           // If strtod matched more characters, it must have a
>           decimal part
>           if (float_end > int_end)
> -            expr = new(ctx) s_float(f);
> +            expr = new(ctx) s_float((float) f);
>           else
>              expr = new(ctx) s_int(i);
>        } else {
> --
> 1.7.3.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list