diff options
| author | Graham Linden <graham@lindenlab.com> | 2014-04-22 22:19:39 -0700 | 
|---|---|---|
| committer | Graham Linden <graham@lindenlab.com> | 2014-04-22 22:19:39 -0700 | 
| commit | 5cbcff7b4045e5246eee5c86f789394510cb0669 (patch) | |
| tree | 900a56f9cad12b73d8507fae37b538cfc968f6bd | |
| parent | 99952dc3583c48a3da8bbfdf1861c876bb6656d0 (diff) | |
Appease GCC 4.6.1 syntax problems with uintptr_t in alignment asserts
| -rwxr-xr-x | indra/llcommon/llmemory.h | 10 | ||||
| -rwxr-xr-x | indra/llmath/llvolume.h | 1 | 
2 files changed, 6 insertions, 5 deletions
| diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index 61e30f11cc..9ff884ca2a 100755 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -27,6 +27,8 @@  #define LLMEMORY_H  #include "linden_common.h" +#include "stdtypes.h" +#include <stdint.h>  class LLMutex ; @@ -39,7 +41,7 @@ class LLMutex ;  LL_COMMON_API void ll_assert_aligned_func(uintptr_t ptr,U32 alignment);  #ifdef SHOW_ASSERT -#define ll_assert_aligned(ptr,alignment) ll_assert_aligned_func(reinterpret_cast<uintptr_t>(ptr),((U32)alignment)) +#define ll_assert_aligned(ptr,alignment) ll_assert_aligned_func(uintptr_t(ptr),((U32)alignment))  #else  #define ll_assert_aligned(ptr,alignment)  #endif @@ -49,13 +51,13 @@ LL_COMMON_API void ll_assert_aligned_func(uintptr_t ptr,U32 alignment);  template <typename T> T* LL_NEXT_ALIGNED_ADDRESS(T* address)   {   	return reinterpret_cast<T*>( -		(reinterpret_cast<uintptr_t>(address) + 0xF) & ~0xF); +		(uintptr_t(address) + 0xF) & ~0xF);  }  template <typename T> T* LL_NEXT_ALIGNED_ADDRESS_64(T* address)   {   	return reinterpret_cast<T*>( -		(reinterpret_cast<uintptr_t>(address) + 0x3F) & ~0x3F); +		(uintptr_t(address) + 0x3F) & ~0x3F);  }  #if LL_LINUX || LL_DARWIN @@ -81,7 +83,7 @@ inline void* ll_aligned_malloc( size_t size, int align )  #else  	void* mem = malloc( size + (align - 1) + sizeof(void*) );  	char* aligned = ((char*)mem) + sizeof(void*); -	aligned += align - ((uintptr_t)aligned & (align - 1)); +	aligned += align - (uintptr_t(aligned) & (align - 1));  	((void**)aligned)[-1] = mem;  	return aligned; diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index d2cb052043..3d7d4b40d1 100755 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -1083,7 +1083,6 @@ public:  	BOOL mGenerateSingleFace; -	typedef std::vector<LLVolumeFace> face_list_t;  	face_list_t mVolumeFaces;  public: | 
