[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21354] branches/soc-2009-jaguarandi/ source/blender/render/intern/include/rayobject.h: Fixed memory aligns for 64bits

André Pinto andresusanopinto at gmail.com
Fri Jul 3 19:10:54 CEST 2009


Revision: 21354
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21354
Author:   jaguarandi
Date:     2009-07-03 19:10:54 +0200 (Fri, 03 Jul 2009)

Log Message:
-----------
Fixed memory aligns for 64bits

Modified Paths:
--------------
    branches/soc-2009-jaguarandi/source/blender/render/intern/include/rayobject.h

Modified: branches/soc-2009-jaguarandi/source/blender/render/intern/include/rayobject.h
===================================================================
--- branches/soc-2009-jaguarandi/source/blender/render/intern/include/rayobject.h	2009-07-03 15:59:59 UTC (rev 21353)
+++ branches/soc-2009-jaguarandi/source/blender/render/intern/include/rayobject.h	2009-07-03 17:10:54 UTC (rev 21354)
@@ -102,14 +102,13 @@
 	
 } 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_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)	((((int)o)&3) == 0)
-#define RayObject_isRayFace(o)	((((int)o)&3) == 1)
-#define RayObject_isRayAPI(o)	((((int)o)&3) == 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





More information about the Bf-blender-cvs mailing list