diff options
author | ludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-11-03 17:03:54 +0000 |
---|---|---|
committer | ludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-11-03 17:03:54 +0000 |
commit | b31e8a67d9b1f11b9943b595a4fd66d3a07dd085 (patch) | |
tree | 712bb692c851148cf64d90d53dce9c753fb83923 /code/qcommon/qcommon.h | |
parent | 5502af97628223ea8f5192647cb1dd5dbd72ae3b (diff) | |
download | ioquake3-aero-b31e8a67d9b1f11b9943b595a4fd66d3a07dd085.tar.gz ioquake3-aero-b31e8a67d9b1f11b9943b595a4fd66d3a07dd085.zip |
fix strict aliasing issues
Patch by Przemysław Iskra (#3805)
git-svn-id: svn://svn.icculus.org/quake3/trunk@1481 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon/qcommon.h')
-rw-r--r-- | code/qcommon/qcommon.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h index 5838bf7..6a264d3 100644 --- a/code/qcommon/qcommon.h +++ b/code/qcommon/qcommon.h @@ -356,12 +356,9 @@ void *VM_ExplicitArgPtr( vm_t *vm, intptr_t intValue ); #define VMA(x) VM_ArgPtr(args[x]) static ID_INLINE float _vmf(intptr_t x) { - union { - int i; - float f; - } t; - t.i = (int)x; - return t.f; + floatint_t fi; + fi.i = (int) x; + return fi.f; } #define VMF(x) _vmf(args[x]) |