From 3f1f89405e0db3f0e53c74a51519a11d0455e974 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 30 Aug 2020 20:22:21 +0100 Subject: [PATCH] Removed unused datastructure in auto-router. May (or may not) have some effect on #5424. Fixes https://gitlab.com/kicad/code/kicad/issues/5424 --- pcbnew/autorouter/ar_matrix.cpp | 17 ----------------- pcbnew/autorouter/ar_matrix.h | 3 --- 2 files changed, 20 deletions(-) diff --git a/pcbnew/autorouter/ar_matrix.cpp b/pcbnew/autorouter/ar_matrix.cpp index 7efcc17d2b..9fbaffb15a 100644 --- a/pcbnew/autorouter/ar_matrix.cpp +++ b/pcbnew/autorouter/ar_matrix.cpp @@ -39,8 +39,6 @@ AR_MATRIX::AR_MATRIX() m_BoardSide[1] = nullptr; m_DistSide[0] = nullptr; m_DistSide[1] = nullptr; - m_DirSide[0] = nullptr; - m_DirSide[1] = nullptr; m_opWriteCell = nullptr; m_Nrows = 0; m_Ncols = 0; @@ -103,7 +101,6 @@ int AR_MATRIX::InitRoutingMatrix() { m_BoardSide[side] = nullptr; m_DistSide[side] = nullptr; - m_DirSide[side] = nullptr; // allocate matrix & initialize everything to empty m_BoardSide[side] = (MATRIX_CELL*) operator new( ii * sizeof( MATRIX_CELL ) ); @@ -119,13 +116,6 @@ int AR_MATRIX::InitRoutingMatrix() if( m_DistSide[side] == nullptr ) return -1; - // allocate Dir (chars) - m_DirSide[side] = (char*) operator new( ii ); - memset( m_DirSide[side], 0, ii ); - - if( m_DirSide[side] == nullptr ) - return -1; - side = AR_SIDE_TOP; } @@ -142,13 +132,6 @@ void AR_MATRIX::UnInitRoutingMatrix() for( ii = 0; ii < AR_MAX_ROUTING_LAYERS_COUNT; ii++ ) { - // de-allocate Dir matrix - if( m_DirSide[ii] ) - { - delete m_DirSide[ii]; - m_DirSide[ii] = nullptr; - } - // de-allocate Distances matrix if( m_DistSide[ii] ) { diff --git a/pcbnew/autorouter/ar_matrix.h b/pcbnew/autorouter/ar_matrix.h index 01833171b7..daab32edf1 100644 --- a/pcbnew/autorouter/ar_matrix.h +++ b/pcbnew/autorouter/ar_matrix.h @@ -51,13 +51,10 @@ class AR_MATRIX public: typedef unsigned char MATRIX_CELL; typedef int DIST_CELL; - typedef char DIR_CELL; MATRIX_CELL* m_BoardSide[AR_MAX_ROUTING_LAYERS_COUNT]; // the image map of 2 board sides DIST_CELL* m_DistSide[AR_MAX_ROUTING_LAYERS_COUNT]; // the image map of 2 board sides: // distance to cells - DIR_CELL* m_DirSide[AR_MAX_ROUTING_LAYERS_COUNT]; // the image map of 2 board sides: - // pointers back to source int m_RoutingLayersCount; // Number of layers for autorouting (0 or 1) int m_GridRouting; // Size of grid for autoplace/autoroute EDA_RECT m_BrdBox; // Actual board bounding box