Commit 039d42da authored by hybrid's avatar hybrid

Fix strict-aliasing problem.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2807 dfc29bdd-3216-0410-991c-e03cc46cb475
parent bcf09b2e
......@@ -418,7 +418,7 @@ REALINLINE f32 fix_inverse32 ( const f32 x )
static inline int f_round2(f32 f)
{
f += (3<<22);
return *((int*)&f) - 0x4b400000;
return IR(f) - 0x4b400000;
}
/*
......@@ -514,7 +514,7 @@ inline s32 roundFix ( const tFixPoint x )
inline s32 f32_to_23Bits(const f32 x)
{
f32 y = x + 1.f;
return ((u32&)y) & 0x7FFFFF; // last 23 bits
return IR(y) & 0x7FFFFF; // last 23 bits
}
/*!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment