diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-03 20:59:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-03 20:59:04 +0300 |
commit | 3c184def72693e319253c31896b385c297183778 (patch) | |
tree | 665530e6a8a0a1e57ee7b02221b2530f10eb10c4 /source/blender/editors/transform | |
parent | 709c727c510a85426b87a9a2fb7fb8517fef7de9 (diff) |
use NULL instead of 0 for pointers, (editors)
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform.c | 14 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 6 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index ede8af2afe8..5708b4fa8b7 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1989,7 +1989,7 @@ static void constraintTransLim(TransInfo *UNUSED(t), TransData *td) { if (td->con) { bConstraintTypeInfo *cti= get_constraint_typeinfo(CONSTRAINT_TYPE_LOCLIMIT); - bConstraintOb cob= {0}; + bConstraintOb cob= {NULL}; bConstraint *con; /* Make a temporary bConstraintOb for using these limit constraints @@ -2145,7 +2145,7 @@ static void constraintSizeLim(TransInfo *t, TransData *td) { if (td->con && td->ext) { bConstraintTypeInfo *cti= get_constraint_typeinfo(CONSTRAINT_TYPE_SIZELIMIT); - bConstraintOb cob= {0}; + bConstraintOb cob= {NULL}; bConstraint *con; /* Make a temporary bConstraintOb for using these limit constraints @@ -2279,10 +2279,10 @@ int handleEventWarp(TransInfo *t, wmEvent *event) if (event->type == MIDDLEMOUSE && event->val==KM_PRESS) { // Use customData pointer to signal warp direction - if (t->customData == 0) + if (t->customData == NULL) t->customData = (void*)1; else - t->customData = 0; + t->customData = NULL; status = 1; } @@ -2420,7 +2420,7 @@ int handleEventShear(TransInfo *t, wmEvent *event) if (event->type == MIDDLEMOUSE && event->val==KM_PRESS) { // Use customData pointer to signal Shear direction - if (t->customData == 0) + if (t->customData == NULL) { initMouseInputMode(t, &t->mouse, INPUT_VERTICAL_ABSOLUTE); t->customData = (void*)1; @@ -2428,7 +2428,7 @@ int handleEventShear(TransInfo *t, wmEvent *event) else { initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_ABSOLUTE); - t->customData = 0; + t->customData = NULL; } status = 1; @@ -2472,7 +2472,7 @@ int Shear(TransInfo *t, short UNUSED(mval[2])) unit_m3(smat); // Custom data signals shear direction - if (t->customData == 0) + if (t->customData == NULL) smat[1][0] = value; else smat[0][1] = value; diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 11f82f4160d..9a70ec2f3be 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -1742,10 +1742,10 @@ static void createTransParticleVerts(bContext *C, TransInfo *t) td->ival = *(key->time); /* abuse size and quat for min/max values */ td->flag |= TD_NO_EXT; - if(k==0) tx->size = 0; + if(k==0) tx->size = NULL; else tx->size = (key - 1)->time; - if(k == point->totkey - 1) tx->quat = 0; + if(k == point->totkey - 1) tx->quat = NULL; else tx->quat = (key + 1)->time; } @@ -5088,7 +5088,7 @@ static void createTransObject(bContext *C, TransInfo *t) } /* select linked objects, but skip them later */ - if (ob->id.lib != 0) { + if (ob->id.lib != NULL) { td->flag |= TD_SKIP; } diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 01d30d67fdf..1fb57f2820d 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -338,7 +338,7 @@ void recalcData(TransInfo *t) Scene *scene= t->scene; SpaceAction *saction= (SpaceAction *)t->sa->spacedata.first; - bAnimContext ac= {0}; + bAnimContext ac= {NULL}; ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; int filter; |