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>2013-08-07 07:36:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-07 07:36:05 +0400
commitf97a4bd25458fdc8da1a97f7b68a305c8ab35ff4 (patch)
tree833fde5e6a46028fb9cebf1234cca6956bb6099b
parentc2ad963e2877851a02f2aa7355751733867bd87c (diff)
code cleanup: more zero as NULL pointers.
-rw-r--r--source/blender/blenfont/BLF_api.h4
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c4
-rw-r--r--source/blender/blenkernel/intern/image_gen.c2
-rw-r--r--source/blender/blenkernel/intern/smoke.c6
-rw-r--r--source/blender/blenkernel/intern/tracking.c2
-rw-r--r--source/blender/blenlib/intern/scanfill.c8
-rw-r--r--source/blender/blenlib/intern/voronoi.c4
-rw-r--r--source/blender/editors/animation/keyframes_draw.c8
-rw-r--r--source/blender/editors/armature/pose_transform.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c2
-rw-r--r--source/blender/modifiers/intern/MOD_boolean_util.c4
-rw-r--r--source/blender/modifiers/intern/MOD_warp.c4
12 files changed, 25 insertions, 25 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h
index fd8bd196717..8f77f8c984d 100644
--- a/source/blender/blenfont/BLF_api.h
+++ b/source/blender/blenfont/BLF_api.h
@@ -149,11 +149,11 @@ void BLF_shadow_offset(int fontid, int x, int y);
/* Set the buffer, size and number of channels to draw, one thing to take care is call
* this function with NULL pointer when we finish, for example:
*
- * BLF_buffer(my_fbuf, my_cbuf, 100, 100, 4, TRUE);
+ * BLF_buffer(my_fbuf, my_cbuf, 100, 100, 4, TRUE, NULL);
*
* ... set color, position and draw ...
*
- * BLF_buffer(NULL, NULL, 0, 0, 0, FALSE);
+ * BLF_buffer(NULL, NULL, NULL, 0, 0, FALSE, NULL);
*/
void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int nch, struct ColorManagedDisplay *display);
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index dcbbd776228..a62ca530bf9 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -3290,7 +3290,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
if (!brush->dm) return 0;
{
- BVHTreeFromMesh treeData = {0};
+ BVHTreeFromMesh treeData = {NULL};
float avg_brushNor[3] = {0.0f};
float brush_radius = brush->paint_distance * surface->radius_scale;
int numOfVerts;
@@ -4977,7 +4977,7 @@ static int dynamicPaint_doStep(Scene *scene, Object *ob, DynamicPaintSurface *su
/* make sure we're dealing with a brush */
if (pmd2->brush) {
DynamicPaintBrushSettings *brush = pmd2->brush;
- BrushMaterials bMats = {0};
+ BrushMaterials bMats = {NULL};
/* calculate brush speed vectors if required */
if (surface->type == MOD_DPAINT_SURFACE_T_PAINT && brush->flags & MOD_DPAINT_DO_SMUDGE) {
diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c
index eda22a095ef..71b4f9947a4 100644
--- a/source/blender/blenkernel/intern/image_gen.c
+++ b/source/blender/blenkernel/intern/image_gen.c
@@ -336,7 +336,7 @@ static void checker_board_text(unsigned char *rect, float *rect_float, int width
}
/* cleanup the buffer. */
- BLF_buffer(mono, NULL, NULL, 0, 0, 0, FALSE);
+ BLF_buffer(mono, NULL, NULL, 0, 0, 0, NULL);
}
void BKE_image_buf_fill_checker_color(unsigned char *rect, float *rect_float, int width, int height)
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 789b0ec5823..bb65955e3b5 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -722,7 +722,7 @@ static void obstacles_from_derivedmesh(Object *coll_ob, SmokeDomainSettings *sds
DerivedMesh *dm = NULL;
MVert *mvert = NULL;
MFace *mface = NULL;
- BVHTreeFromMesh treeData = {0};
+ BVHTreeFromMesh treeData = {NULL};
int numverts, i, z;
float surface_distance = 0.6;
@@ -1573,7 +1573,7 @@ static void emit_from_derivedmesh(Object *flow_ob, SmokeDomainSettings *sds, Smo
MVert *mvert_orig = NULL;
MFace *mface = NULL;
MTFace *tface = NULL;
- BVHTreeFromMesh treeData = {0};
+ BVHTreeFromMesh treeData = {NULL};
int numOfVerts, i, z;
float flow_center[3] = {0};
@@ -2108,7 +2108,7 @@ static void update_flowsfluids(Scene *scene, Object *ob, SmokeDomainSettings *sd
// float scene_subframe = scene->r.subframe; // UNUSED
int subframe;
for (subframe = 0; subframe <= subframes; subframe++) {
- EmissionMap em_temp = {0};
+ EmissionMap em_temp = {NULL};
float sample_size = 1.0f / (float)(subframes+1);
float prev_frame_pos = sample_size * (float)(subframe+1);
float sdt = dt * sample_size;
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index 12c2967afcf..4c363292898 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -654,7 +654,7 @@ void BKE_tracking_track_flag_clear(MovieTrackingTrack *track, int area, int flag
*/
int BKE_tracking_track_has_marker_at_frame(MovieTrackingTrack *track, int framenr)
{
- return BKE_tracking_marker_get_exact(track, framenr) != 0;
+ return BKE_tracking_marker_get_exact(track, framenr) != NULL;
}
/* Check whether track has got enabled marker at specified frame.
diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c
index 873ce302b9c..c7163874dca 100644
--- a/source/blender/blenlib/intern/scanfill.c
+++ b/source/blender/blenlib/intern/scanfill.c
@@ -379,10 +379,10 @@ static ScanFillVertLink *addedgetoscanlist(ScanFillContext *sf_ctx, ScanFillEdge
sc = (ScanFillVertLink *)bsearch(&scsearch, sf_ctx->_scdata, len,
sizeof(ScanFillVertLink), vergscdata);
- if (sc == 0) printf("Error in search edge: %p\n", (void *)eed);
+ if (sc == NULL) printf("Error in search edge: %p\n", (void *)eed);
else if (addedgetoscanvert(sc, eed) == 0) return sc;
- return 0;
+ return NULL;
}
static short boundinsideEV(ScanFillEdge *eed, ScanFillVert *eve)
@@ -669,7 +669,7 @@ static int scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int flag)
a = verts;
break;
}
- if (ed2 == 0) {
+ if (ed2 == NULL) {
sc->edge_first = sc->edge_last = NULL;
/* printf("just 1 edge to vert\n"); */
BLI_addtail(&sf_ctx->filledgebase, ed1);
@@ -1051,7 +1051,7 @@ int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag, const float no
eed = nexted;
}
}
- if (sf_ctx->filledgebase.first == 0) {
+ if (sf_ctx->filledgebase.first == NULL) {
/* printf("All edges removed\n"); */
return 0;
}
diff --git a/source/blender/blenlib/intern/voronoi.c b/source/blender/blenlib/intern/voronoi.c
index 7a545090090..3f6adff1eda 100644
--- a/source/blender/blenlib/intern/voronoi.c
+++ b/source/blender/blenlib/intern/voronoi.c
@@ -121,7 +121,7 @@ static VoronoiParabola *voronoiParabola_new(void)
parabola->is_leaf = FALSE;
parabola->event = NULL;
parabola->edge = NULL;
- parabola->parent = 0;
+ parabola->parent = NULL;
return parabola;
}
@@ -134,7 +134,7 @@ static VoronoiParabola *voronoiParabola_newSite(float site[2])
parabola->is_leaf = TRUE;
parabola->event = NULL;
parabola->edge = NULL;
- parabola->parent = 0;
+ parabola->parent = NULL;
return parabola;
}
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index 4e6cc53f962..db51e3c2398 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -793,7 +793,7 @@ void draw_action_channel(View2D *v2d, AnimData *adt, bAction *act, float ypos)
{
DLRBT_Tree keys, blocks;
- short locked = (act && act->id.lib != 0);
+ short locked = (act && act->id.lib != NULL);
BLI_dlrbTree_init(&keys);
BLI_dlrbTree_init(&blocks);
@@ -887,7 +887,7 @@ void scene_to_keylist(bDopeSheet *ads, Scene *sce, DLRBT_Tree *keys, DLRBT_Tree
bAnimListElem *ale;
int filter;
- bAnimListElem dummychan = {0};
+ bAnimListElem dummychan = {NULL};
if (sce == NULL)
return;
@@ -920,8 +920,8 @@ void ob_to_keylist(bDopeSheet *ads, Object *ob, DLRBT_Tree *keys, DLRBT_Tree *bl
bAnimListElem *ale;
int filter;
- bAnimListElem dummychan = {0};
- Base dummybase = {0};
+ bAnimListElem dummychan = {NULL};
+ Base dummybase = {NULL};
if (ob == NULL)
return;
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c
index c530faedd68..79ca70a6189 100644
--- a/source/blender/editors/armature/pose_transform.c
+++ b/source/blender/editors/armature/pose_transform.c
@@ -815,7 +815,7 @@ static int pose_clear_user_transforms_exec(bContext *C, wmOperator *op)
* just pose values should change, so this should be fine
*/
bPose *dummyPose = NULL;
- Object workob = {{0}};
+ Object workob = {{NULL}};
bPoseChannel *pchan;
/* execute animation step for current frame using a dummy copy of the pose */
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 3ac3564ed45..2c654507015 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -3364,7 +3364,7 @@ static int paint_weight_gradient_exec(bContext *C, wmOperator *op)
const bool is_interactive = (gesture != NULL);
DerivedMesh *dm = mesh_get_derived_final(scene, ob, scene->customdata_mask);
- DMGradient_userData data = {0};
+ DMGradient_userData data = {NULL};
if (is_interactive) {
if (gesture->userdata == NULL) {
diff --git a/source/blender/modifiers/intern/MOD_boolean_util.c b/source/blender/modifiers/intern/MOD_boolean_util.c
index 02ec6108733..98fab9c06ff 100644
--- a/source/blender/modifiers/intern/MOD_boolean_util.c
+++ b/source/blender/modifiers/intern/MOD_boolean_util.c
@@ -519,8 +519,8 @@ static DerivedMesh *NewBooleanDerivedMesh_intern(
DerivedMesh *result = NULL;
- if (dm == NULL || dm_select == NULL) return 0;
- if (!dm->getNumTessFaces(dm) || !dm_select->getNumTessFaces(dm_select)) return 0;
+ if (dm == NULL || dm_select == NULL) return NULL;
+ if (!dm->getNumTessFaces(dm) || !dm_select->getNumTessFaces(dm_select)) return NULL;
/* we map the final object back into ob's local coordinate space. For this
* we need to compute the inverse transform from global to ob (inv_mat),
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c
index 3429acdcea4..4fac201377a 100644
--- a/source/blender/modifiers/intern/MOD_warp.c
+++ b/source/blender/modifiers/intern/MOD_warp.c
@@ -368,8 +368,8 @@ ModifierTypeInfo modifierType_Warp = {
/* deformMatrices */ NULL,
/* deformVertsEM */ deformVertsEM,
/* deformMatricesEM */ NULL,
- /* applyModifier */ 0,
- /* applyModifierEM */ 0,
+ /* applyModifier */ NULL,
+ /* applyModifierEM */ NULL,
/* initData */ initData,
/* requiredDataMask */ requiredDataMask,
/* freeData */ freeData,