diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-29 00:06:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-29 00:06:52 +0400 |
commit | d309aa2d9acc6758ab9671bfc8b780c85750be94 (patch) | |
tree | 68745640f4add9b27e92ecc97b79b704620145b1 /source/blender | |
parent | 8a76aa2e479c05946f97aade4a733b0fea45dbf3 (diff) |
fix for leak in bmo_edgenet_fill_exec and remove invalid comment.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/bmesh/operators/bmo_create.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/source/blender/bmesh/operators/bmo_create.c b/source/blender/bmesh/operators/bmo_create.c index 5e9178c0a01..1a65db0e808 100644 --- a/source/blender/bmesh/operators/bmo_create.c +++ b/source/blender/bmesh/operators/bmo_create.c @@ -83,7 +83,7 @@ static int count_edge_faces(BMesh *bm, BMEdge *e); ) -static int rotsys_append_edge(struct BMEdge *e, struct BMVert *v, +static int rotsys_append_edge(BMEdge *e, BMVert *v, EdgeData *edata, VertData *vdata) { EdgeData *ed = &edata[BM_elem_index_get(e)]; @@ -115,7 +115,7 @@ static int rotsys_append_edge(struct BMEdge *e, struct BMVert *v, return TRUE; } -static void UNUSED_FUNCTION(rotsys_remove_edge)(struct BMEdge *e, struct BMVert *v, +static void UNUSED_FUNCTION(rotsys_remove_edge)(BMEdge *e, BMVert *v, EdgeData *edata, VertData *vdata) { EdgeData *ed = edata + BM_elem_index_get(e); @@ -139,8 +139,8 @@ static void UNUSED_FUNCTION(rotsys_remove_edge)(struct BMEdge *e, struct BMVert e1->next = e1->prev = NULL; } -static struct BMEdge *rotsys_nextedge(struct BMEdge *e, struct BMVert *v, - EdgeData *edata, VertData *UNUSED(vdata)) +static BMEdge *rotsys_nextedge(BMEdge *e, BMVert *v, + EdgeData *edata, VertData *UNUSED(vdata)) { if (v == e->v1) return edata[BM_elem_index_get(e)].v1_disk_link.next; @@ -159,7 +159,7 @@ static BMEdge *rotsys_prevedge(BMEdge *e, BMVert *v, return NULL; } -static void rotsys_reverse(struct BMEdge *UNUSED(e), struct BMVert *v, EdgeData *edata, VertData *vdata) +static void rotsys_reverse(BMEdge *UNUSED(e), BMVert *v, EdgeData *edata, VertData *vdata) { BMEdge **edges = NULL; BMEdge *e_first; @@ -186,7 +186,7 @@ static void rotsys_reverse(struct BMEdge *UNUSED(e), struct BMVert *v, EdgeData BLI_array_free(edges); } -static int UNUSED_FUNCTION(rotsys_count)(struct BMVert *v, EdgeData *edata, VertData *vdata) +static int UNUSED_FUNCTION(rotsys_count)(BMVert *v, EdgeData *edata, VertData *vdata) { BMEdge *e = vdata[BM_elem_index_get(v)].e; int i = 0; @@ -870,7 +870,7 @@ void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op) EdgeData *edata; VertData *vdata; BMEdge **edges = NULL; - PathBase *pathbase = edge_pathbase_new(); + PathBase *pathbase; BLI_array_declare(edges); int use_restrict = BMO_slot_bool_get(op, "use_restrict"); int use_fill_check = BMO_slot_bool_get(op, "use_fill_check"); @@ -880,6 +880,8 @@ void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op) if (!bm->totvert || !bm->totedge) return; + pathbase = edge_pathbase_new(); + edata = MEM_callocN(sizeof(EdgeData) * bm->totedge, "EdgeData"); vdata = MEM_callocN(sizeof(VertData) * bm->totvert, "VertData"); @@ -1332,10 +1334,6 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op) } /* --- end special case support, continue as normal --- */ - - /* possible bug?, selecting 2 triangles and pressing F will make a quad rather then joining them, - * perhaps this should be looked into? - campbell */ - /* call edgenet create */ /* call edgenet prepare op so additional face creation cases wor */ BMO_op_initf(bm, &op2, "edgenet_prepare edges=%fe", ELE_NEW); |