[Bf-blender-cvs] [847b7bc] master: Code cleanup: pack BezTriple a little (though size remains same)

Campbell Barton noreply at git.blender.org
Mon Mar 31 14:39:48 CEST 2014


Commit: 847b7bcbeaa95311e9713a4ca77d8e3fbe91b5fb
Author: Campbell Barton
Date:   Mon Mar 31 19:56:00 2014 +1100
https://developer.blender.org/rB847b7bcbeaa95311e9713a4ca77d8e3fbe91b5fb

Code cleanup: pack BezTriple a little (though size remains same)

===================================================================

M	source/blender/makesdna/DNA_curve_types.h
M	source/blender/makesdna/DNA_userdef_types.h

===================================================================

diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 2d3a28f..82ec02e 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -109,18 +109,18 @@ typedef struct BezTriple {
 	float vec[3][3];
 	float alfa, weight, radius;	/* alfa: tilt in 3D View, weight: used for softbody goal weight, radius: for bevel tapering */
 	
-	short ipo;					/* ipo: interpolation mode for segment from this BezTriple to the next */
+	char ipo;					/* ipo: interpolation mode for segment from this BezTriple to the next */
 	
 	char h1, h2; 				/* h1, h2: the handle type of the two handles */
 	char f1, f2, f3;			/* f1, f2, f3: used for selection status */
 	
 	char hide;					/* hide: used to indicate whether BezTriple is hidden (3D), type of keyframe (eBezTriple_KeyframeTypes) */
 	
+	char easing;				/* easing: easing type for interpolation mode (eBezTriple_Easing) */
 	float back;					/* BEZT_IPO_BACK */
 	float amplitude, period;	/* BEZT_IPO_ELASTIC */
-	char easing;				/* easing: easing type for interpolation mode (eBezTriple_Easing) */
-	
-	char pad[3];
+
+	char  pad[4];
 } BezTriple;
 
 /* note; alfa location in struct is abused by Key system */
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index d584fd5..4f5670d 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -485,8 +485,9 @@ typedef struct UserDef {
 	short glreslimit;
 	short curssize;
 	short color_picker_type;
-	short ipo_new;			/* interpolation mode for newly added F-Curves */
-	short keyhandles_new;	/* handle types for newly added keyframes */
+	char  ipo_new;			/* interpolation mode for newly added F-Curves */
+	char  keyhandles_new;	/* handle types for newly added keyframes */
+	char  pad1[2];
 
 	short scrcastfps;		/* frame rate for screencast to be played back */
 	short scrcastwait;		/* milliseconds between screencast snapshots */




More information about the Bf-blender-cvs mailing list