In Occurrence_Contains(), accept everything when _instance is NULL.

* Bug: In Hurricane::Occurrence_Contains(), when the Instance to match
    is set to NULL, that means we have to accept *all* instances instead
    of rejecting them all. This bug was making the Cell::flattenedNets()
    to do nothing in digital mode.
This commit is contained in:
Jean-Paul Chaput 2017-11-03 00:06:06 +01:00
parent de02cf5685
commit 141cb6e7c2
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ namespace Hurricane {
bool Occurrence_Contains::accept ( Occurrence occurrence ) const
{
if (not _instance) return false;
if (not _instance) return true;
if (dynamic_cast<Instance*>(occurrence.getEntity()) == _instance) return true;
for ( Instance* instance : occurrence.getPath().getInstances() ) {