In getCapacity(), check for empty intervals.

This commit is contained in:
Jean-Paul Chaput 2016-05-26 18:54:57 +02:00
parent fd692d3978
commit 6ef5819310
2 changed files with 4 additions and 1 deletions

View File

@ -124,6 +124,9 @@ namespace Anabatic {
Box ab = getCell()->getAbutmentBox();
RoutingGauge* rg = _configuration->getRoutingGauge();
span.inflate( 0, -1 );
if (span.isEmpty()) return 0;
const vector<RoutingLayerGauge*>& layerGauges = rg->getLayerGauges();
for ( size_t depth=0 ; depth <= _configuration->getAllowedDepth() ; ++depth ) {
if (layerGauges[depth]->getType() != Constant::Default) continue;

View File

@ -177,7 +177,7 @@ namespace Anabatic {
{
Interval side = getSide();
_axis = side.getCenter();
_capacity = getAnabatic()->getCapacity( side.inflate(0,-1), _flags );
_capacity = getAnabatic()->getCapacity( side, _flags );
_flags.reset( Flags::Invalidated );
cdebug.log(110) << "Edge::_revalidate() " << this << endl;