}
}
-/* resetObjlist:
- * Reset objlist so it can be reused, using
- * the same memory.
- */
-static void resetObjlist(objlist * l)
-{
- l->cnt = 0;
-}
-
/* makeClustObs:
* Create an obstacle corresponding to a cluster's bbox.
*/
node_t *head;
edge_t *e;
edge_t *e0;
- objlist *objl = NULL;
vconfig_t *vconfig;
int rv = 0;
if (n == head && ED_count(e)) { /* self arc */
makeSelfArcs(e, GD_nodesep(g));
} else if (ED_count(e)) {
- objl = objectList(e, pm);
+ objlist *objl = objectList(e, pm);
assert(objl->cnt <= INT_MAX);
if (Plegal_arrangement(objl->obs, (int)objl->cnt)) {
vconfig = Pobsopen(objl->obs, (int)objl->cnt);
if (!vconfig) {
agerr(AGWARN, "compoundEdges: could not construct obstacles - falling back to straight line edges\n");
rv = 1;
+ freeObjlist(objl);
continue;
}
}
margin.x, margin.y, pm->x, pm->y);
rv = 1;
}
+ freeObjlist(objl);
continue;
}
assert(objl->cnt <= INT_MAX);
makeSpline(e0, objl->obs, (int)objl->cnt, false);
}
- resetObjlist(objl);
+ freeObjlist(objl);
}
}
}
- freeObjlist(objl);
return rv;
}