mirror of https://github.com/KLayout/klayout.git
Fixed #846
This commit is contained in:
parent
4982d63597
commit
d65148ed0b
|
|
@ -113,6 +113,10 @@ NetlistCrossReference::other_net_for (const db::Net *net) const
|
|||
const NetlistCrossReference::PerNetData *
|
||||
NetlistCrossReference::per_net_data_for (const std::pair<const db::Net *, const db::Net *> &nets) const
|
||||
{
|
||||
if (! nets.first && ! nets.second) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::map<std::pair<const db::Net *, const db::Net *>, PerNetData>::iterator i = m_per_net_data.find (nets);
|
||||
if (i == m_per_net_data.end ()) {
|
||||
i = m_per_net_data.insert (std::make_pair (nets, PerNetData ())).first;
|
||||
|
|
@ -628,11 +632,13 @@ NetlistCrossReference::build_subcircuit_pin_refs (const std::pair<const db::Net
|
|||
void
|
||||
NetlistCrossReference::build_per_net_info (const std::pair<const db::Net *, const db::Net *> &nets, PerNetData &data) const
|
||||
{
|
||||
if (! nets.second) {
|
||||
if (! nets.first && ! nets.second) {
|
||||
// .. nothing ..
|
||||
} else if (! nets.second) {
|
||||
init_data_from_single (nets.first, data, true);
|
||||
} else if (! nets.first) {
|
||||
init_data_from_single (nets.second, data, false);
|
||||
} else if (nets.first) {
|
||||
} else {
|
||||
build_terminal_refs (nets, data);
|
||||
build_pin_refs (nets, data);
|
||||
build_subcircuit_pin_refs (nets, data);
|
||||
|
|
|
|||
|
|
@ -233,11 +233,11 @@ static QString escaped (const std::string &s)
|
|||
}
|
||||
|
||||
template <class Obj>
|
||||
static std::string str_from_expanded_name (const Obj *obj, bool dash_for_empty = false)
|
||||
static std::string str_from_expanded_name (const Obj *obj, bool indicate_empty = false)
|
||||
{
|
||||
if (obj) {
|
||||
return obj->expanded_name ();
|
||||
} else if (dash_for_empty) {
|
||||
} else if (indicate_empty) {
|
||||
return std::string ("-");
|
||||
} else {
|
||||
return std::string ();
|
||||
|
|
@ -245,11 +245,11 @@ static std::string str_from_expanded_name (const Obj *obj, bool dash_for_empty =
|
|||
}
|
||||
|
||||
template <class Obj>
|
||||
static std::string str_from_name (const Obj *obj, bool dash_for_empty = false)
|
||||
static std::string str_from_name (const Obj *obj, bool indicate_empty = false)
|
||||
{
|
||||
if (obj) {
|
||||
return obj->name ();
|
||||
} else if (dash_for_empty) {
|
||||
} else if (indicate_empty) {
|
||||
return std::string ("-");
|
||||
} else {
|
||||
return std::string ();
|
||||
|
|
@ -264,7 +264,7 @@ static std::string str_from_expanded_names (const std::pair<const Obj *, const O
|
|||
std::string s = str_from_expanded_name (objs.first, ! is_single);
|
||||
if (! is_single) {
|
||||
std::string t = str_from_expanded_name (objs.second, ! is_single);
|
||||
if (t != s) {
|
||||
if (t != s || ! objs.first || ! objs.second) {
|
||||
s += var_sep;
|
||||
s += t;
|
||||
}
|
||||
|
|
@ -278,7 +278,7 @@ static std::string str_from_names (const std::pair<const Obj *, const Obj *> &ob
|
|||
std::string s = str_from_name (objs.first, ! is_single);
|
||||
if (! is_single) {
|
||||
std::string t = str_from_name (objs.second, ! is_single);
|
||||
if (t != s) {
|
||||
if (t != s || ! objs.first || ! objs.second) {
|
||||
s += var_sep;
|
||||
s += t;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue