@@ -407,9 +407,9 @@ const QStringList ClassNetlist::get(const QVector<net_t> &nets)
407407const QVector<net_t > ClassNetlist::netsDriving (net_t n)
408408{
409409 QVector<net_t > nets;
410- const QVector<Trans *> &gates = m_netlist[n].gates ;
410+ const QVector<Trans*> &gates = m_netlist[n].gates ;
411411
412- for (const auto t : gates)
412+ for (Trans * t : gates)
413413 {
414414 if ((t->c1 > 2 ) && !nets.contains (t->c1 )) // c1 is the source
415415 nets.append (t->c1 );
@@ -426,9 +426,11 @@ const QVector<net_t> ClassNetlist::netsDriving(net_t n)
426426const QVector<net_t > ClassNetlist::netsDriven (net_t n)
427427{
428428 QVector<net_t > nets;
429- for (auto &t : m_netlist[n].c1c2s )
429+ for (Trans *t : m_netlist[n].c1c2s )
430+ {
430431 if (!nets.contains (t->gate ))
431432 nets.append (t->gate );
433+ }
432434 std::sort (nets.begin (), nets.end ()); // Sorting numbers only
433435 return nets;
434436}
@@ -439,8 +441,8 @@ const QVector<net_t> ClassNetlist::netsDriven(net_t n)
439441inline pin_t ClassNetlist::getNetStateEx (net_t n)
440442{
441443 // Every transistor in the contributing nets needs to be off for this net to be hi-Z
442- for (auto &tran : m_netlist[n].c1c2s )
443- if (tran ->on ) return !!m_netlist[n].state ;
444+ for (Trans *t : m_netlist[n].c1c2s )
445+ if (t ->on ) return !!m_netlist[n].state ;
444446 // If nothing is explicitly driving this net, it will be "1" if it has an internal pullup
445447 if (m_netlist[n].hasPullup )
446448 return 1 ;
@@ -520,12 +522,12 @@ const QString ClassNetlist::netInfo(net_t net)
520522 {
521523 // Transistor numbers for which this net is either a source or a drain
522524 QStringList c1c2s;
523- for (auto & t : m_netlist[net].c1c2s )
524- c1c2s.append (QString::number (t - &m_transdefs[ 0 ] ));
525+ for (Trans * t : m_netlist[net].c1c2s )
526+ c1c2s.append (QString::number (t-> id ));
525527 // Transistor numbers for which this net is a gate
526528 QStringList gates;
527- for (auto & t : m_netlist[net].gates )
528- gates.append (QString::number (t - &m_transdefs[ 0 ] ));
529+ for (Trans * t : m_netlist[net].gates )
530+ gates.append (QString::number (t-> id ));
529531 // Limit printing up to 20 gate nets which is more than a practical limit.
530532 // This prevents large nets like clk to take over the log window
531533 if (gates.count () > 20 )
0 commit comments