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>2011-02-13 13:52:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-13 13:52:18 +0300
commit0955c664aa7c5fc5f0bd345c58219c40f04ab9c1 (patch)
tree20b6a2ab2e1130d75d119eba09f3b195a33a9434 /source/blender/blenkernel/intern/displist.c
parentf3bd89b1b7a86778ff4c633a6b4115309a1b3c7e (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/intern/displist.c')
-rw-r--r--source/blender/blenkernel/intern/displist.c20
1 files changed, 10 insertions, 10 deletions
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 (colnr<dl->col) {
@@ -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;