Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Susano Pinto <andresusanopinto@gmail.com>2009-07-03 21:10:54 +0400
committerAndre Susano Pinto <andresusanopinto@gmail.com>2009-07-03 21:10:54 +0400
commit4a72557e6b3a4b2594ca0a3b971d7f7acf59072a (patch)
treea88fb702260f10e10b59c803ae21a9e73a5c7ef8 /source/blender/render/intern/include/rayobject.h
parent44ef6c1eac75a5076d459500323e0e4467509f56 (diff)
Fixed memory aligns for 64bits
Diffstat (limited to 'source/blender/render/intern/include/rayobject.h')
-rw-r--r--source/blender/render/intern/include/rayobject.h15
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