Commit 68d752bb authored by Wayne Stambaugh's avatar Wayne Stambaugh

Zero memory to duplicate behavior changed when C malloc() was replaced by C++ new().

parent e8c3ca29
......@@ -115,18 +115,21 @@ int MATRIX_ROUTING_HEAD::InitBoard()
/* allocate Board & initialize everything to empty */
m_BoardSide[kk] = (MATRIX_CELL*) operator new( ii * sizeof(MATRIX_CELL) );
memset( m_BoardSide[kk], 0, ii * sizeof(MATRIX_CELL) );
if( m_BoardSide[kk] == NULL )
return -1;
/***** allocate Distances *****/
m_DistSide[kk] = (DIST_CELL*) operator new( ii * sizeof(DIST_CELL) );
memset( m_DistSide[kk], 0, ii * sizeof(DIST_CELL) );
if( m_DistSide[kk] == NULL )
return -1;
/***** allocate Dir (chars) *****/
m_DirSide[kk] = (char*) operator new( ii );
memset( m_DirSide[kk], 0, ii );
if( m_DirSide[kk] == NULL )
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment