From d168dc65fe6111942875555658c4566086627cb0 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 15 Jan 2022 13:32:45 -0800 Subject: [PATCH] Agglomerative_Ink_Bundling_establish: remove unused 'mask' It is unclear to me what the purpose of this local was intended to be. Furthermore it was being mis-allocated as if it were an array of doubles, not ints. --- lib/mingle/agglomerative_bundling.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/mingle/agglomerative_bundling.cpp b/lib/mingle/agglomerative_bundling.cpp index bee4d2715..93c8b6c91 100644 --- a/lib/mingle/agglomerative_bundling.cpp +++ b/lib/mingle/agglomerative_bundling.cpp @@ -86,7 +86,6 @@ static Agglomerative_Ink_Bundling Agglomerative_Ink_Bundling_establish(Agglomera int n = grid->n, level = grid->level, nc = 0; int *ia = A->ia, *ja = A->ja; int i, j, k, jj, jc, jmax, ni, nj, npicks; - int *mask; pedge *edges = grid->edges; double *inks = grid->inks, *cinks, inki, inkj; double gain, maxgain, minink, total_gain = 0; @@ -105,9 +104,6 @@ static Agglomerative_Ink_Bundling Agglomerative_Ink_Bundling_establish(Agglomera jp = grid->R0->ja; } - mask = (int*)MALLOC(sizeof(double)*n); - for (i = 0; i < n; i++) mask[i] = -1; - assert(n == A->n); std::vector matching(n, UNMATCHED); @@ -285,7 +281,6 @@ static Agglomerative_Ink_Bundling Agglomerative_Ink_Bundling_establish(Agglomera } RETURN: - free(mask); return grid; } -- 2.40.0