summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoroondas Gupte <hg@boroon.dasgupta.ch>2010-10-24 16:01:57 +0200
committerBoroondas Gupte <hg@boroon.dasgupta.ch>2010-10-24 16:01:57 +0200
commite2049c332b9b834e843249c1ae0ba8542491940f (patch)
tree0afb502359bd85a2d5c0be24b52a5224b9175509
parent71de5f622a7917f78823a7e7840194e1b0f8f070 (diff)
CTS-323: (part 1 of 2) Don't cast pointers to U32
-rw-r--r--doc/contributions.txt1
-rw-r--r--indra/llmath/llsimdmath.h6
2 files changed, 5 insertions, 2 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index c8125c675f..200d8b6b17 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -149,6 +149,7 @@ Blakar Ogre
blino Nakamura
VWR-17
Boroondas Gupte
+ CTS-323
SNOW-278
VWR-233
WEB-262
diff --git a/indra/llmath/llsimdmath.h b/indra/llmath/llsimdmath.h
index 9377bfdb53..1be1b7a55f 100644
--- a/indra/llmath/llsimdmath.h
+++ b/indra/llmath/llsimdmath.h
@@ -41,16 +41,18 @@
#error SSE2 not enabled. LLVector4a and related class will not compile.
#endif
+#include <stdint.h>
+
template <typename T> T* LL_NEXT_ALIGNED_ADDRESS(T* address)
{
return reinterpret_cast<T*>(
- (reinterpret_cast<U32>(address) + 0xF) & ~0xF);
+ (reinterpret_cast<uintptr_t>(address) + 0xF) & ~0xF);
}
template <typename T> T* LL_NEXT_ALIGNED_ADDRESS_64(T* address)
{
return reinterpret_cast<T*>(
- (reinterpret_cast<U32>(address) + 0x3F) & ~0x3F);
+ (reinterpret_cast<uintptr_t>(address) + 0x3F) & ~0x3F);
}
#if LL_LINUX || LL_DARWIN