diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-18 19:09:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-18 19:09:30 +0400 |
commit | 6db3375e4f6b14a7583473a00beb637f4173a4ed (patch) | |
tree | 83be247bb911037c0f6a31e2cda451ee5cdea7bc /source | |
parent | 58a00e7396ca9e01254eb6015bb74cac1bc26a97 (diff) |
code cleanup: removed unneeded null check in object drawing, some warnings, style.
Diffstat (limited to 'source')
4 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/editmesh_bvh.c b/source/blender/blenkernel/intern/editmesh_bvh.c index 14e6eedec7c..979a38f0346 100644 --- a/source/blender/blenkernel/intern/editmesh_bvh.c +++ b/source/blender/blenkernel/intern/editmesh_bvh.c @@ -138,7 +138,7 @@ void BKE_bmbvh_free(BMBVHTree *bmtree) BLI_bvhtree_free(bmtree->tree); if (bmtree->cos_cage && bmtree->cos_cage_free) { - MEM_freeN(bmtree->cos_cage); + MEM_freeN((void *)bmtree->cos_cage); } MEM_freeN(bmtree); diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 3811e8b7d8c..e0ca7841b5a 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -2939,7 +2939,7 @@ static void knifetool_exit_ex(bContext *C, KnifeTool_OpData *kcd) ED_region_tag_redraw(kcd->ar); if (kcd->cagecos) - MEM_freeN(kcd->cagecos); + MEM_freeN((void *)kcd->cagecos); if (kcd->linehits) MEM_freeN(kcd->linehits); diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c index 2b7101c8c4e..5be47e5ef6e 100644 --- a/source/blender/editors/space_node/node_templates.c +++ b/source/blender/editors/space_node/node_templates.c @@ -209,8 +209,7 @@ static void node_socket_add_replace(const bContext *C, bNodeTree *ntree, bNode * if (!(node_from->inputs.first == NULL && !(node_from->typeinfo->flag & NODE_OPTIONS))) node_from = NULL; - if (node_prev && node_prev->type == type && node_link_item_compare(node_prev, item)) - { + if (node_prev && node_prev->type == type && node_link_item_compare(node_prev, item)) { /* keep the previous node if it's the same type */ node_from = node_prev; } @@ -303,7 +302,7 @@ static void ui_node_link_items(NodeLinkArg *arg, int in_out, NodeLinkItem **r_it int i; for (ngroup = arg->bmain->nodetree.first; ngroup; ngroup = ngroup->id.next) { - ListBase *lb = (in_out==SOCK_IN ? &ngroup->inputs : &ngroup->outputs); + ListBase *lb = ((in_out == SOCK_IN) ? &ngroup->inputs : &ngroup->outputs); totitems += BLI_countlist(lb); } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 703e375281a..56a4e55b92a 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -7058,11 +7058,12 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short /* not for sets, duplicators or picking */ if (dflag == 0 && (v3d->flag & V3D_HIDE_HELPLINES) == 0 && (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { ListBase *list; - RigidBodyCon *rbc = ob ? ob->rigidbody_constraint : NULL; + RigidBodyCon *rbc = ob->rigidbody_constraint; /* draw hook center and offset line */ - if (ob != scene->obedit) draw_hooks(ob); - + if (ob != scene->obedit) + draw_hooks(ob); + /* help lines and so */ if (ob != scene->obedit && ob->parent && (ob->parent->lay & v3d->lay)) { setlinestyle(3); |