mirror of
https://github.com/g-truc/glm.git
synced 2024-09-20 00:12:17 +00:00
Fixed aliasing warnings
This commit is contained in:
parent
658d7e2788
commit
0b73091c7f
@ -173,7 +173,8 @@ namespace glm
|
||||
uint64 Value64 = static_cast<uint64>(x) * static_cast<uint64>(y);
|
||||
uint32* PointerMSB = (reinterpret_cast<uint32*>(&Value64) + 1);
|
||||
msb = *PointerMSB;
|
||||
lsb = reinterpret_cast<uint32&>(Value64);
|
||||
uint32* PointerLSB = (reinterpret_cast<uint32*>(&Value64) + 0);
|
||||
lsb = *PointerLSB;
|
||||
}
|
||||
|
||||
template <>
|
||||
@ -233,7 +234,8 @@ namespace glm
|
||||
int64 Value64 = static_cast<int64>(x) * static_cast<int64>(y);
|
||||
int32* PointerMSB = (reinterpret_cast<int32*>(&Value64) + 1);
|
||||
msb = *PointerMSB;
|
||||
lsb = reinterpret_cast<int32&>(Value64);
|
||||
int32* PointerLSB = (reinterpret_cast<int32*>(&Value64));
|
||||
lsb = *PointerLSB;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
Loading…
Reference in New Issue
Block a user