mirror of https://github.com/KLayout/klayout.git
Fixed an assertion happining with Qt binding enabled
This commit is contained in:
parent
7b9a1ffdee
commit
2c245af13a
|
|
@ -679,7 +679,6 @@ ClassBase::classes_in_definition_order (const char *mod_name)
|
||||||
|
|
||||||
if ((*c)->declaration () && (*c)->declaration () != *c && taken.find ((*c)->declaration ()) == taken.end ()) {
|
if ((*c)->declaration () && (*c)->declaration () != *c && taken.find ((*c)->declaration ()) == taken.end ()) {
|
||||||
// can't produce this class yet - it's a reference to another class which is not produced yet.
|
// can't produce this class yet - it's a reference to another class which is not produced yet.
|
||||||
tl_assert ((*c)->declaration () != 0);
|
|
||||||
more_classes.push_back (*c);
|
more_classes.push_back (*c);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1077,8 +1077,12 @@ initialize_expressions ()
|
||||||
std::list<const gsi::ClassBase *> classes = gsi::ClassBase::classes_in_definition_order ();
|
std::list<const gsi::ClassBase *> classes = gsi::ClassBase::classes_in_definition_order ();
|
||||||
for (std::list<const gsi::ClassBase *>::const_iterator c = classes.begin (); c != classes.end (); ++c) {
|
for (std::list<const gsi::ClassBase *>::const_iterator c = classes.begin (); c != classes.end (); ++c) {
|
||||||
|
|
||||||
// Skip external classes
|
// we might encounter a child class which is a reference to a top-level class (e.g.
|
||||||
if ((*c)->is_external ()) {
|
// duplication of enums into child classes). In this case we should create a reference inside the
|
||||||
|
// target class.
|
||||||
|
if ((*c)->declaration () != *c) {
|
||||||
|
tl_assert ((*c)->parent () != 0); // top-level classes should be merged
|
||||||
|
// TODO: implement (see rba.cc:1544 for example)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue