Henri Verbeet : wined3d: Get rid of some powf() calls.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Aug 26 09:57:11 CDT 2015
Module: wine
Branch: master
Commit: 9f530b579eeb538b28e38cd223894cd9374b72f3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9f530b579eeb538b28e38cd223894cd9374b72f3
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Aug 26 12:46:46 2015 +0200
wined3d: Get rid of some powf() calls.
---
dlls/wined3d/surface.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 85ad4a4..fc00823 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1795,21 +1795,21 @@ static inline unsigned short float_32_to_16(const float *in)
if (isinf(*in))
return (*in < 0.0f ? 0xfc00 : 0x7c00);
- if (tmp < powf(2, 10))
+ if (tmp < (float)(1u << 10))
{
do
{
tmp = tmp * 2.0f;
exp--;
- } while (tmp < powf(2, 10));
+ } while (tmp < (float)(1u << 10));
}
- else if (tmp >= powf(2, 11))
+ else if (tmp >= (float)(1u << 11))
{
do
{
tmp /= 2.0f;
exp++;
- } while (tmp >= powf(2, 11));
+ } while (tmp >= (float)(1u << 11));
}
mantissa = (unsigned int)tmp;
More information about the wine-cvs
mailing list