tmp
authoryu.dongliang <18588496441@163.com>
Tue, 7 Nov 2023 13:38:59 +0000 (21:38 +0800)
committeryu.dongliang <18588496441@163.com>
Tue, 7 Nov 2023 13:38:59 +0000 (21:38 +0800)
ses_layout.c

index a5f00744344a50861a68d6fc14a6971ffbeaa49f..e48fbd3dfd40e0318910033119a0aea10ba7bea9 100644 (file)
@@ -453,6 +453,10 @@ static int __ses_layout_lines3(ScfEfunction* f)
                N  = v->edges->size;
        }
 
+       scf_vector_t* paths = scf_vector_alloc();
+       int ret = __ses_topo_paths(f, paths);
+       if (ret < 0)
+               return ret;
 
        for (j = N; j >= 1; j--) {
 
@@ -1337,15 +1341,9 @@ int ses_layout_function(ScfEfunction* f, int d)
        f->w = 0;
        f->h = 0;
 
-       scf_vector_t* paths = scf_vector_alloc();
-
-       int ret = __ses_topo_paths(f, paths);
-       if (ret < 0)
-               return ret;
-
        qsort(f->elines, f->n_elines, sizeof(ScfEline*), eline_cmp);
 
-       ret = __ses_layout_lines(f, d);
+       int ret = __ses_layout_lines(f, d);
        if (ret < 0)
                return ret;