From 2e8054b0d735dedf236910f8a676bc5baa097717 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 27 Nov 2022 11:29:00 -0800 Subject: [PATCH] =?utf8?q?sfdpgen=20spring=5Felectrical=5Fembedding=5Fslow?= =?utf8?q?:=20remove=20allocation=20of=20unused=20qtree=5Flev=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit `qtree_level_optimizer` was being allocated, but unused after propagating deletion of the always-false `USE_QT`. --- lib/sfdpgen/spring_electrical.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/sfdpgen/spring_electrical.c b/lib/sfdpgen/spring_electrical.c index 75aa793a7..f36e7469c 100644 --- a/lib/sfdpgen/spring_electrical.c +++ b/lib/sfdpgen/spring_electrical.c @@ -666,8 +666,6 @@ static void spring_electrical_embedding_slow(int dim, SparseMatrix A0, spring_el double total_cpu = 0; start0 = clock(); #endif - int max_qtree_level = ctrl->max_qtree_level; - oned_optimizer qtree_level_optimizer = NULL; fprintf(stderr,"spring_electrical_embedding_slow"); if (!A || maxiter <= 0) return; @@ -676,9 +674,6 @@ static void spring_electrical_embedding_slow(int dim, SparseMatrix A0, spring_el if (n <= 0 || dim <= 0) return; force = gv_calloc(n *dim, sizeof(double)); - if (n >= ctrl->quadtree_size) { - qtree_level_optimizer = oned_optimizer_new(max_qtree_level); - } *flag = 0; if (m != n) { *flag = ERROR_NOT_SQUARE_MATRIX; @@ -815,7 +810,6 @@ static void spring_electrical_embedding_slow(int dim, SparseMatrix A0, spring_el #endif RETURN: - oned_optimizer_delete(qtree_level_optimizer); free(xold); if (A != A0) SparseMatrix_delete(A); free(f); -- 2.40.0