aboutsummaryrefslogtreecommitdiffstats
path: root/code/qcommon/qcommon.h
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-11-03 17:03:54 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-11-03 17:03:54 +0000
commitb31e8a67d9b1f11b9943b595a4fd66d3a07dd085 (patch)
tree712bb692c851148cf64d90d53dce9c753fb83923 /code/qcommon/qcommon.h
parent5502af97628223ea8f5192647cb1dd5dbd72ae3b (diff)
downloadioquake3-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.h9
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])