EgtGeomKernel 1.9h1 :
- sistemazioni varie in CAvToolTriangle - utilizzo di std::async in CAvToolSurfTm - corretto GetAllTriaAroundVertex di SurfTm - aggiunto ( nothrow) a tutti i new.
This commit is contained in:
+7
-7
@@ -103,7 +103,7 @@ HashGrid2d::HashGrid2d( double dCellSpan)
|
||||
m_enlargementThreshold = m_xyCellCount / minimalGridDensity ;
|
||||
|
||||
// allocazione dell'array lineare che rappresenta lo hash grid.
|
||||
m_cell = new Cell[ m_xyCellCount] ;
|
||||
m_cell = new( nothrow) Cell[ m_xyCellCount] ;
|
||||
|
||||
// ogni cella è già inizializzata come vuota
|
||||
// imposto gli offset ai vicini
|
||||
@@ -274,7 +274,7 @@ HashGrid2d::InitNeighborOffsets( void)
|
||||
if ( x == 0 || x == (xc - 1) ||
|
||||
y == 0 || y == (yc - 1)) {
|
||||
|
||||
c->m_neighborOffset = new int[9] ;
|
||||
c->m_neighborOffset = new( nothrow) int[9] ;
|
||||
|
||||
i = 0 ;
|
||||
for ( int yy = -xc ; yy <= xc ; yy += xc) {
|
||||
@@ -352,7 +352,7 @@ HashGrid2d::Add( HashGrids2d::ObjData& obj, Cell* cell)
|
||||
// reserved). Furthermore, the cell must be inserted into the grid-global vector 'm_occupiedCells'
|
||||
// in which all cells that are currently occupied by bodies are recorded.
|
||||
else {
|
||||
cell->m_Objs = new HashGrids2d::PtrObjVector ;
|
||||
cell->m_Objs = new( nothrow) HashGrids2d::PtrObjVector ;
|
||||
cell->m_Objs->reserve( cellVectorSize) ;
|
||||
|
||||
obj.nCellId = 0 ;
|
||||
@@ -441,7 +441,7 @@ HashGrid2d::Enlarge( void)
|
||||
m_enlargementThreshold = m_xyCellCount / minimalGridDensity ;
|
||||
|
||||
// ... a new linear array of cells representing this enlarged hash grid is allocated and ...
|
||||
m_cell = new Cell[ m_xyCellCount] ;
|
||||
m_cell = new( nothrow) Cell[ m_xyCellCount] ;
|
||||
|
||||
// ... initialized, and finally ...
|
||||
InitNeighborOffsets() ;
|
||||
@@ -695,7 +695,7 @@ HashGrids2d::addGrid( ObjData& obj)
|
||||
// If no hash grid yet exists in the hierarchy, an initial hash grid is created
|
||||
// based on the body's size.
|
||||
|
||||
pGrid = new HashGrid2d( size * sqrt( hierarchyFactor)) ;
|
||||
pGrid = new( nothrow) HashGrid2d( size * sqrt( hierarchyFactor)) ;
|
||||
}
|
||||
else {
|
||||
// Check the hierarchy for a hash grid with suitably sized cells - if such a grid does not
|
||||
@@ -711,7 +711,7 @@ HashGrids2d::addGrid( ObjData& obj)
|
||||
if ( size < cellSpan ) {
|
||||
while ( size < cellSpan)
|
||||
cellSpan /= hierarchyFactor ;
|
||||
pGrid = new HashGrid2d( cellSpan * hierarchyFactor) ;
|
||||
pGrid = new( nothrow) HashGrid2d( cellSpan * hierarchyFactor) ;
|
||||
m_GridList.insert( g, pGrid) ;
|
||||
}
|
||||
|
||||
@@ -724,7 +724,7 @@ HashGrids2d::addGrid( ObjData& obj)
|
||||
|
||||
while ( size >= cellSpan)
|
||||
cellSpan *= hierarchyFactor ;
|
||||
pGrid = new HashGrid2d( cellSpan) ;
|
||||
pGrid = new( nothrow) HashGrid2d( cellSpan) ;
|
||||
}
|
||||
|
||||
pGrid->Add( obj) ;
|
||||
|
||||
Reference in New Issue
Block a user