[PATCH 1/5] d3dx9_36: Replace powf(2, unsigned int) with (1u << unsigned int).

Matteo Bruni matteo.mystral at gmail.com
Tue Nov 24 11:54:39 CST 2015


2015-11-22 1:00 GMT+01:00 Stefan Dösinger <stefan at codeweavers.com>:
> The code deviates from wined3d's float_32_to_16. As far as I can see
> (https://www.winehq.org/pipermail/wine-devel/2011-February/088981.html)
> this is intentional.
>
> I have placed the casts to float to stay in sync with float_32_to_16.
> Visual Studio 2015 doesn't need them, it only warns about signed vs
> unsigned int comparisons and never warns if a float is involved. GCC
> doesn't generate a warning, and neither does clang as far as I can see.
>
> The last changed line has a cast to unsigned int anyway, this one is
> needed to make MSVC happy.
>
> Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>



More information about the wine-patches mailing list