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:
authorCampbell Barton <ideasman42@gmail.com>2010-11-23 11:44:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-23 11:44:21 +0300
commitce2295999e5fc667f3574b9c53cba04155bd1546 (patch)
treef54198fa757c4282a2f0f79c46d6fedbbf728480 /source/blender/editors/animation
parent225be0cf30940cf840bbac0f19b10efadecf94d4 (diff)
use zero initializers instead of memset(), also change PointerRNA_NULL from an extern into a define.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/keyframing.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index fd8487973c8..1216894e973 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -287,13 +287,12 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag)
*/
int insert_vert_fcurve (FCurve *fcu, float x, float y, short flag)
{
- BezTriple beztr;
+ BezTriple beztr= {{{0}}};
int a;
/* set all three points, for nicer start position
* NOTE: +/- 1 on vec.x for left and right handles is so that 'free' handles work ok...
*/
- memset(&beztr, 0, sizeof(BezTriple));
beztr.vec[0][0]= x-1.0f;
beztr.vec[0][1]= y;
beztr.vec[1][0]= x;
@@ -1355,7 +1354,7 @@ static int insert_key_button_exec (bContext *C, wmOperator *op)
{
Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
- PointerRNA ptr;
+ PointerRNA ptr= {{0}};
PropertyRNA *prop= NULL;
char *path;
float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
@@ -1367,7 +1366,6 @@ static int insert_key_button_exec (bContext *C, wmOperator *op)
flag = ANIM_get_keyframing_flags(scene, 1);
/* try to insert keyframe using property retrieved from UI */
- memset(&ptr, 0, sizeof(PointerRNA));
uiContextActiveProperty(C, &ptr, &prop, &index);
if ((ptr.id.data && ptr.data && prop) && RNA_property_animateable(&ptr, prop)) {