diff options
author | Andrés <andmarti@gmail.com> | 2021-04-25 18:47:14 -0300 |
---|---|---|
committer | Andrés <andmarti@gmail.com> | 2021-04-25 18:47:14 -0300 |
commit | 9fcf5ab1579b5a1791fe78fe0fc7798d8d59f718 (patch) | |
tree | e424de5a0c95569ac8657e8230523cbd1b600298 /src/dep_graph.c | |
parent | bc8b18eb2ed01685cfe6f6a676aa886d8b86f55e (diff) |
fix indentation
Diffstat (limited to 'src/dep_graph.c')
-rw-r--r-- | src/dep_graph.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/dep_graph.c b/src/dep_graph.c index 207ba86..555bda7 100644 --- a/src/dep_graph.c +++ b/src/dep_graph.c @@ -376,17 +376,17 @@ void destroy_vertex(struct ent * ent) { // for each edge in edges, we look for the reference to the vertex we are deleting, and we erase it! edgeT * e = v_cur->edges; if (v_cur->back_edges == NULL) - while (e != NULL && v_cur->back_edges == NULL) { - // sc_debug("edge: we follow %d %d", e->connectsTo->ent->row, e->connectsTo->ent->col); - delete_reference(v_cur, e->connectsTo, 1); - - // delete vertex only if it end up having no edges, no expression, no value, no label.... - if (e->connectsTo->edges == NULL && e->connectsTo->back_edges == NULL && !e->connectsTo->ent->expr && !(e->connectsTo->ent->flags & is_valid) && ! e->connectsTo->ent->label) - destroy_vertex(e->connectsTo->ent); -// WARNING: an orphan vertex now represents an ent that has an enode thats -// need to be evaluated, but do not depends on another cell. - e = e->next; - } + while (e != NULL && v_cur->back_edges == NULL) { + // sc_debug("edge: we follow %d %d", e->connectsTo->ent->row, e->connectsTo->ent->col); + delete_reference(v_cur, e->connectsTo, 1); + + // delete vertex only if it end up having no edges, no expression, no value, no label.... + if (e->connectsTo->edges == NULL && e->connectsTo->back_edges == NULL && !e->connectsTo->ent->expr && !(e->connectsTo->ent->flags & is_valid) && ! e->connectsTo->ent->label) + destroy_vertex(e->connectsTo->ent); + // WARNING: an orphan vertex now represents an ent that has an enode thats + // need to be evaluated, but do not depends on another cell. + e = e->next; + } destroy_list_edges(v_cur->edges); v_cur->edges = NULL; @@ -394,7 +394,6 @@ void destroy_vertex(struct ent * ent) { destroy_list_edges(v_cur->back_edges); v_cur->back_edges = NULL; - // if vertex to free was the first one.. if (graph->vertices && graph->vertices->ent->row == ent->row && graph->vertices->ent->col == ent->col) graph->vertices = v_cur->next; |