diff options
author | Andre Susano Pinto <andresusanopinto@gmail.com> | 2009-07-03 21:10:54 +0400 |
---|---|---|
committer | Andre Susano Pinto <andresusanopinto@gmail.com> | 2009-07-03 21:10:54 +0400 |
commit | 4a72557e6b3a4b2594ca0a3b971d7f7acf59072a (patch) | |
tree | a88fb702260f10e10b59c803ae21a9e73a5c7ef8 /source/blender/render/intern/include | |
parent | 44ef6c1eac75a5076d459500323e0e4467509f56 (diff) |
Fixed memory aligns for 64bits
Diffstat (limited to 'source/blender/render/intern/include')
-rw-r--r-- | source/blender/render/intern/include/rayobject.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/render/intern/include/rayobject.h b/source/blender/render/intern/include/rayobject.h index 3b77341f229..c611e2ceca2 100644 --- a/source/blender/render/intern/include/rayobject.h +++ b/source/blender/render/intern/include/rayobject.h @@ -102,14 +102,13 @@ typedef struct RayObjectAPI } RayObjectAPI; -//TODO use intptr_t -#define RayObject_align(o) ((RayObject*)(((int)o)&(~3))) -#define RayObject_unalignRayFace(o) ((RayObject*)(((int)o)|1)) -#define RayObject_unalignRayAPI(o) ((RayObject*)(((int)o)|2)) - -#define RayObject_isAligned(o) ((((int)o)&3) == 0) -#define RayObject_isRayFace(o) ((((int)o)&3) == 1) -#define RayObject_isRayAPI(o) ((((int)o)&3) == 2) +#define RayObject_align(o) ((RayObject*)(((intptr_t)o)&(~3))) +#define RayObject_unalignRayFace(o) ((RayObject*)(((intptr_t)o)|1)) +#define RayObject_unalignRayAPI(o) ((RayObject*)(((intptr_t)o)|2)) + +#define RayObject_isAligned(o) ((((intptr_t)o)&3) == 0) +#define RayObject_isRayFace(o) ((((intptr_t)o)&3) == 1) +#define RayObject_isRayAPI(o) ((((intptr_t)o)&3) == 2) /* * Extend min/max coords so that the rayobject is inside them |