[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48853] trunk/blender/source/blender: - add a temp var for edge scanfill (fits in 4 bytes alignment - won' t increase mem usage)

Campbell Barton ideasman42 at gmail.com
Thu Jul 12 10:34:59 CEST 2012


Revision: 48853
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48853
Author:   campbellbarton
Date:     2012-07-12 08:34:59 +0000 (Thu, 12 Jul 2012)
Log Message:
-----------
- add a temp var for edge scanfill (fits in 4 bytes alignment - won't increase mem usage)
- make keyindex an unsigned int, since its used to store vertex indices
- use BLI_in_rcti_v for IN_2D_VERT_SCROLL and IN_2D_HORIZ_SCROLL

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/BLI_scanfill.h
    trunk/blender/source/blender/editors/include/UI_view2d.h

Modified: trunk/blender/source/blender/blenlib/BLI_scanfill.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_scanfill.h	2012-07-12 08:31:23 UTC (rev 48852)
+++ trunk/blender/source/blender/blenlib/BLI_scanfill.h	2012-07-12 08:34:59 UTC (rev 48853)
@@ -70,7 +70,7 @@
 	} tmp;
 	float co[3]; /* vertex location */
 	float xy[2]; /* 2D copy of vertex location (using dominant axis) */
-	int keyindex; /* original index #, for restoring  key information */
+	unsigned int keyindex; /* original index #, for restoring  key information */
 	short poly_nr;
 	unsigned char f, h;
 } ScanFillVert;
@@ -80,6 +80,9 @@
 	struct ScanFillVert *v1, *v2;
 	short poly_nr;
 	unsigned char f;
+	union {
+		unsigned char c;
+	} tmp;
 } ScanFillEdge;
 
 typedef struct ScanFillFace {

Modified: trunk/blender/source/blender/editors/include/UI_view2d.h
===================================================================
--- trunk/blender/source/blender/editors/include/UI_view2d.h	2012-07-12 08:31:23 UTC (rev 48852)
+++ trunk/blender/source/blender/editors/include/UI_view2d.h	2012-07-12 08:34:59 UTC (rev 48853)
@@ -120,8 +120,8 @@
 /* Macros:								*/
 
 /* test if mouse in a scrollbar (assume that scroller availability has been tested) */
-#define IN_2D_VERT_SCROLL(v2d, co) (BLI_in_rcti(&v2d->vert, co[0], co[1]))
-#define IN_2D_HORIZ_SCROLL(v2d, co) (BLI_in_rcti(&v2d->hor, co[0], co[1]))
+#define IN_2D_VERT_SCROLL(v2d, co)   (BLI_in_rcti_v(&v2d->vert, co))
+#define IN_2D_HORIZ_SCROLL(v2d, co)  (BLI_in_rcti_v(&v2d->hor,  co))
 
 /* ------------------------------------------ */
 /* Type definitions:                          */




More information about the Bf-blender-cvs mailing list