summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-12-20 17:14:51 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-12-20 17:14:51 -0500
commit261ac32dda439fa1fc5708c78168967bf4d484e6 (patch)
tree22f0e531422f6b39b40ed943c80e13634a15e7a4 /indra/llmath
parent4bd6edc6b037195012583467a3e5e754f6a5af77 (diff)
parente9d21ba941a52665d7ad2ee3483c6ac7b7ec6486 (diff)
merge
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llsimdmath.h8
-rw-r--r--indra/llmath/llvolume.cpp7
2 files changed, 11 insertions, 4 deletions
diff --git a/indra/llmath/llsimdmath.h b/indra/llmath/llsimdmath.h
index d6debce2d7..c7cdf7b32c 100644
--- a/indra/llmath/llsimdmath.h
+++ b/indra/llmath/llsimdmath.h
@@ -35,16 +35,20 @@
#error SSE2 not enabled. LLVector4a and related class will not compile.
#endif
+#if !LL_WINDOWS
+#include <stdint.h>
+#endif
+
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
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index c20124076b..8a7b19800c 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -29,6 +29,9 @@
#include "llmath.h"
#include <set>
+#if !LL_WINDOWS
+#include <stdint.h>
+#endif
#include "llerror.h"
#include "llmemtype.h"
@@ -90,10 +93,10 @@ const S32 SCULPT_MIN_AREA_DETAIL = 1;
extern BOOL gDebugGL;
-void assert_aligned(void* ptr, U32 alignment)
+void assert_aligned(void* ptr, uintptr_t alignment)
{
#if 0
- U32 t = (U32) ptr;
+ uintptr_t t = (uintptr_t) ptr;
if (t%alignment != 0)
{
llerrs << "WTF?" << llendl;