From: Magnus Jacobsson Date: Tue, 12 Jul 2022 13:04:57 +0000 (+0200) Subject: gvFreeLayout: correct comments about reset and root graph X-Git-Tag: 5.0.1~31^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74b8351663b444e66e14b0a204ad22e1242ae436;p=graphviz gvFreeLayout: correct comments about reset and root graph This comment was added in 44b02b91bd156cb832894fb4948bf4bc75ab27cb, but this commit changed the cleanup to work on the given graph (possibly a subgraph), not the root graph. The resets mentioned were removed in 67acd9e27a053a5b80b3d1458f512d472debb434, b3b7e0d1aea43baa81bf06a27d38447d6958c1b8 and a71555a4ac650bf91396c77c277697b45eee44e6, although the called `graph_cleanup` function does its own reset. --- diff --git a/lib/gvc/gvlayout.c b/lib/gvc/gvlayout.c index c0ffe0785..df5a176cf 100644 --- a/lib/gvc/gvlayout.c +++ b/lib/gvc/gvlayout.c @@ -101,7 +101,7 @@ bool gvLayoutDone(Agraph_t * g) * Free layout resources. * First, if the graph has a layout-specific cleanup function attached, * use it and reset. - * Then, if the root graph has not been cleaned up, clean it up and reset. + * Then, if the graph has a drawing, do the general graph cleanup. */ int gvFreeLayout(GVC_t * gvc, Agraph_t * g) {