diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/editderivedmesh.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/key.c | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/multires.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pbvh.c | 20 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_buffer.h | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_smooth_laplacian.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/tools/bmesh_decimate_collapse.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_navmesh.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 4 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_laplaciansmooth.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_skin.c | 2 |
15 files changed, 28 insertions, 27 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 8fedb425af1..2ece90183bd 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -2635,9 +2635,9 @@ void DM_add_tangent_layer(DerivedMesh *dm) /* new computation method */ { - SGLSLMeshToTangent mesh2tangent = {0}; - SMikkTSpaceContext sContext = {0}; - SMikkTSpaceInterface sInterface = {0}; + SGLSLMeshToTangent mesh2tangent = {NULL}; + SMikkTSpaceContext sContext = {NULL}; + SMikkTSpaceInterface sInterface = {NULL}; mesh2tangent.precomputedFaceNormals = nors; mesh2tangent.mtface = mtface; diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c index feb18c3babe..e8e56c6f17b 100644 --- a/source/blender/blenkernel/intern/editderivedmesh.c +++ b/source/blender/blenkernel/intern/editderivedmesh.c @@ -1064,7 +1064,7 @@ static void emDM_drawMappedFacesMat(DerivedMesh *dm, const float (*vertexNos)[3]; const float (*polyNos)[3]; BMFace *efa; - DMVertexAttribs attribs = {{{0}}}; + DMVertexAttribs attribs = {{{NULL}}}; GPUVertexAttribs gattribs; int i, matnr, new_matnr; diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 5b8929e49fe..d2d2cb1c2d0 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -190,7 +190,8 @@ Key *BKE_key_copy_nolib(Key *key) Key *keyn; KeyBlock *kbn, *kb; - if (key == 0) return 0; + if (key == NULL) + return NULL; keyn = MEM_dupallocN(key); diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index 95bf56d00f2..32ca3ea6d5a 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -245,7 +245,7 @@ static void multires_mdisps_subdivide_hidden(MDisps *md, int new_level) static MDisps *multires_mdisps_initialize_hidden(Mesh *me, int level) { MDisps *mdisps = CustomData_add_layer(&me->ldata, CD_MDISPS, - CD_CALLOC, 0, me->totloop); + CD_CALLOC, NULL, me->totloop); int gridsize = ccg_gridsize(level); int gridarea = gridsize * gridsize; int i, j, k; diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index 9290ccc8c5d..205159c94a1 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -838,12 +838,12 @@ static void free_tree(node_tree *tree) { if (tree->left) { free_tree(tree->left); - tree->left = 0; + tree->left = NULL; } if (tree->right) { free_tree(tree->right); - tree->right = 0; + tree->right = NULL; } free(tree); @@ -860,7 +860,7 @@ static void BKE_pbvh_search_callback_occluded(PBVH *bvh, { PBVHIter iter; PBVHNode *node; - node_tree *tree = 0; + node_tree *tree = NULL; pbvh_iter_begin(&iter, bvh, scb, search_data); @@ -1356,7 +1356,7 @@ void BKE_pbvh_node_get_proxies(PBVHNode *node, PBVHProxyNode **proxies, int *pro if (proxy_count) *proxy_count = node->proxy_count; } else { - if (proxies) *proxies = 0; + if (proxies) *proxies = NULL; if (proxy_count) *proxy_count = 0; } } @@ -1788,11 +1788,11 @@ void BKE_pbvh_node_free_proxies(PBVHNode *node) for (p = 0; p < node->proxy_count; p++) { MEM_freeN(node->proxies[p].co); - node->proxies[p].co = 0; + node->proxies[p].co = NULL; } MEM_freeN(node->proxies); - node->proxies = 0; + node->proxies = NULL; node->proxy_count = 0; } @@ -1836,10 +1836,10 @@ void pbvh_vertex_iter_init(PBVH *bvh, PBVHNode *node, int *grid_indices, *vert_indices; int totgrid, gridsize, uniq_verts, totvert; - vi->grid = 0; - vi->no = 0; - vi->fno = 0; - vi->mvert = 0; + vi->grid = NULL; + vi->no = NULL; + vi->fno = NULL; + vi->mvert = NULL; BKE_pbvh_node_get_grids(bvh, node, &grid_indices, &totgrid, NULL, &gridsize, &grids, NULL); BKE_pbvh_node_num_verts(bvh, node, &uniq_verts, &totvert); diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index cc33727030a..35482d9553d 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -3139,7 +3139,7 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss, int numTex, numCol; int hasPCol, hasOrigSpace; int gridInternalEdges; - WeightTable wtable = {0}; + WeightTable wtable = {NULL}; /* MCol *mcol; */ /* UNUSED */ MEdge *medge = NULL; /* MFace *mface = NULL; */ diff --git a/source/blender/blenlib/BLI_buffer.h b/source/blender/blenlib/BLI_buffer.h index 879ef869653..461b56e157f 100644 --- a/source/blender/blenlib/BLI_buffer.h +++ b/source/blender/blenlib/BLI_buffer.h @@ -57,7 +57,7 @@ enum { BLI_Buffer name_ = { \ /* clear the static memory if this is a calloc'd array */ \ ((void)((flag_ & BLI_BUFFER_USE_CALLOC) ? \ - memset(name_ ## _static_, 0, sizeof(name_ ## _static_)) : 0\ + memset(name_ ## _static_, 0, sizeof(name_ ## _static_)) : NULL \ ), /* memset-end */ \ name_ ## _static_), \ sizeof(type_), \ diff --git a/source/blender/bmesh/operators/bmo_smooth_laplacian.c b/source/blender/bmesh/operators/bmo_smooth_laplacian.c index 91a52cdabef..3f04e23aa73 100644 --- a/source/blender/bmesh/operators/bmo_smooth_laplacian.c +++ b/source/blender/bmesh/operators/bmo_smooth_laplacian.c @@ -220,7 +220,7 @@ static void init_laplacian_matrix(LaplacianSystem *sys) v1 = vf[0]->co; v2 = vf[1]->co; v3 = vf[2]->co; - v4 = has_4_vert ? vf[3]->co : 0; + v4 = has_4_vert ? vf[3]->co : NULL; if (has_4_vert) { areaf = area_quad_v3(v1, v2, v3, v4); diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c index d3ffc348539..4b6835a81fe 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c +++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c @@ -345,7 +345,7 @@ static bool bm_decim_triangulate_begin(BMesh *bm) } #ifdef USE_SAFETY_CHECKS - if (BM_edge_exists(l_a->v, l_b->v) == false) + if (BM_edge_exists(l_a->v, l_b->v) == NULL) #endif { BMFace *f_new; diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c index 3d8718ef887..66e577975b6 100644 --- a/source/blender/editors/mesh/mesh_navmesh.c +++ b/source/blender/editors/mesh/mesh_navmesh.c @@ -461,7 +461,7 @@ static int navmesh_create_exec(bContext *C, wmOperator *op) unsigned int lay = 0; int nverts = 0, ntris = 0; - int *tris = 0; + int *tris = NULL; float *verts = NULL; createVertsTrisData(C, obs, &nverts, &verts, &ntris, &tris, &lay); diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 059f8de7108..d012a8ac656 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -1336,7 +1336,7 @@ bool ED_mesh_pick_vert(bContext *C, Object *ob, const int mval[2], unsigned int const float mval_f[2] = {(float)mval[0], (float)mval[1]}; - VertPickData data = {0}; + VertPickData data = {NULL}; ED_view3d_init_mats_rv3d(ob, rv3d); diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index b154acc7456..cb2cb801b50 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -1991,7 +1991,7 @@ static struct TransIslandData *editmesh_islands_info_calc(BMEditMesh *em, int *r /* may be an edge OR a face array */ for (i = 0; i < group_tot; i++) { - BMEditSelection ese = {0}; + BMEditSelection ese = {NULL}; const int fg_sta = group_index[i][0]; const int fg_len = group_index[i][1]; @@ -6421,7 +6421,7 @@ void flushTransTracking(TransInfo *t) } } - if (tdt->area != TRACK_AREA_POINT || tdt->relative == 0) { + if (tdt->area != TRACK_AREA_POINT || tdt->relative == NULL) { td2d->loc2d[0] = loc2d[0]; td2d->loc2d[1] = loc2d[1]; diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index af6689e3f6d..49505b03a19 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -362,7 +362,7 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, Object *ob, B ModifierData *md; SubsurfModifierData *smd_real; /* modifier initialization data, will control what type of subdivision will happen*/ - SubsurfModifierData smd = {{0}}; + SubsurfModifierData smd = {{NULL}}; /* Used to hold subsurfed Mesh */ DerivedMesh *derivedMesh, *initialDerived; /* holds original indices for subsurfed mesh */ diff --git a/source/blender/modifiers/intern/MOD_laplaciansmooth.c b/source/blender/modifiers/intern/MOD_laplaciansmooth.c index 1abe1e97a23..3843ee6f535 100644 --- a/source/blender/modifiers/intern/MOD_laplaciansmooth.c +++ b/source/blender/modifiers/intern/MOD_laplaciansmooth.c @@ -366,7 +366,7 @@ static void init_laplacian_matrix(LaplacianSystem *sys) v1 = sys->vertexCos[idv1]; v2 = sys->vertexCos[idv2]; v3 = sys->vertexCos[idv3]; - v4 = has_4_vert ? sys->vertexCos[idv4] : 0; + v4 = has_4_vert ? sys->vertexCos[idv4] : NULL; if (has_4_vert) { areaf = area_quad_v3(v1, v2, v3, sys->vertexCos[sys->mfaces[i].v4]); diff --git a/source/blender/modifiers/intern/MOD_skin.c b/source/blender/modifiers/intern/MOD_skin.c index 56571f69e09..83ac9f34df3 100644 --- a/source/blender/modifiers/intern/MOD_skin.c +++ b/source/blender/modifiers/intern/MOD_skin.c @@ -1751,7 +1751,7 @@ static void skin_set_orig_indices(DerivedMesh *dm) totpoly = dm->getNumPolys(dm); orig = CustomData_add_layer(&dm->polyData, CD_ORIGINDEX, - CD_CALLOC, 0, totpoly); + CD_CALLOC, NULL, totpoly); for (i = 0; i < totpoly; i++) orig[i] = ORIGINDEX_NONE; } |