From 0955c664aa7c5fc5f0bd345c58219c40f04ab9c1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 13 Feb 2011 10:52:18 +0000 Subject: fix for warnings from Sparse static source code checker, mostly BKE/BLI and python functions. - use NULL rather then 0 where possible (makes code & function calls more readable IMHO). - set static variables and functions (exposed some unused vars/funcs). - use func(void) rather then func() for definitions. --- source/blender/blenkernel/intern/displist.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source/blender/blenkernel/intern/displist.c') diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index 3bb62f817cd..837c3bd8356 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -121,7 +121,7 @@ DispList *find_displist(ListBase *lb, int type) dl= dl->next; } - return 0; + return NULL; } int displist_has_faces(ListBase *lb) @@ -930,13 +930,13 @@ void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal) { EditVert *eve, *v1, *vlast; EditFace *efa; - DispList *dlnew=0, *dl; + DispList *dlnew=NULL, *dl; float *f1; int colnr=0, charidx=0, cont=1, tot, a, *index, nextcol= 0; intptr_t totvert; - if(dispbase==0) return; - if(dispbase->first==0) return; + if(dispbase==NULL) return; + if(dispbase->first==NULL) return; while(cont) { cont= 0; @@ -953,7 +953,7 @@ void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal) /* make editverts and edges */ f1= dl->verts; a= dl->nr; - eve= v1= 0; + eve= v1= NULL; while(a--) { vlast= eve; @@ -961,14 +961,14 @@ void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal) eve= BLI_addfillvert(f1); totvert++; - if(vlast==0) v1= eve; + if(vlast==NULL) v1= eve; else { BLI_addfilledge(vlast, eve); } f1+=3; } - if(eve!=0 && v1!=0) { + if(eve!=NULL && v1!=NULL) { BLI_addfilledge(eve, v1); } } else if (colnrcol) { @@ -1058,7 +1058,7 @@ static void bevels_to_filledpoly(Curve *cu, ListBase *dispbase) float *fp, *fp1; int a, dpoly; - front.first= front.last= back.first= back.last= 0; + front.first= front.last= back.first= back.last= NULL; dl= dispbase->first; while(dl) { @@ -1944,7 +1944,7 @@ void imagestodisplist(void) /* this is confusing, there's also min_max_object, appplying the obmat... */ static void boundbox_displist(Object *ob) { - BoundBox *bb=0; + BoundBox *bb=NULL; float min[3], max[3]; DispList *dl; float *vert; @@ -1956,7 +1956,7 @@ static void boundbox_displist(Object *ob) Curve *cu= ob->data; int doit= 0; - if(cu->bb==0) cu->bb= MEM_callocN(sizeof(BoundBox), "boundbox"); + if(cu->bb==NULL) cu->bb= MEM_callocN(sizeof(BoundBox), "boundbox"); bb= cu->bb; dl= ob->disp.first; -- cgit v1.2.3