@@ -40,9 +40,9 @@ void ElementMapping::generateMap()
40
40
41
41
void ElementMapping::generateLogic (GraphicElement *elm)
42
42
{
43
- auto logicElm = ElementFactory::buildLogicElement (elm);
44
- elm->setLogic (logicElm .get ());
45
- m_logicElms.append (logicElm );
43
+ auto logic = ElementFactory::buildLogicElement (elm);
44
+ elm->setLogic (logic .get ());
45
+ m_logicElms.append (logic );
46
46
}
47
47
48
48
void ElementMapping::connectElements ()
@@ -56,32 +56,32 @@ void ElementMapping::connectElements()
56
56
57
57
void ElementMapping::applyConnection (GraphicElement *elm, QNEInputPort *inputPort)
58
58
{
59
- LogicElement *currentLogElm ;
59
+ LogicElement *currentLogic ;
60
60
int inputIndex = 0 ;
61
61
62
62
if (elm->elementType () == ElementType::IC) {
63
63
auto *ic = qobject_cast<IC *>(elm);
64
- currentLogElm = ic->inputLogic (inputPort->index ());
64
+ currentLogic = ic->inputLogic (inputPort->index ());
65
65
} else {
66
- currentLogElm = elm->logic ();
66
+ currentLogic = elm->logic ();
67
67
inputIndex = inputPort->index ();
68
68
}
69
69
70
70
const auto connections = inputPort->connections ();
71
71
72
72
if ((connections.size () == 0 ) && !inputPort->isRequired ()) {
73
73
auto *predecessorLogic = (inputPort->defaultValue () == Status::Active) ? &m_globalVCC : &m_globalGND;
74
- currentLogElm ->connectPredecessor (inputIndex, predecessorLogic, 0 );
74
+ currentLogic ->connectPredecessor (inputIndex, predecessorLogic, 0 );
75
75
}
76
76
77
77
if (connections.size () == 1 ) {
78
78
if (auto *outputPort = connections.constFirst ()->startPort ()) {
79
79
if (auto *predecessorElement = outputPort->graphicElement ()) {
80
80
if (predecessorElement->elementType () == ElementType::IC) {
81
- auto *logic = qobject_cast<IC *>(predecessorElement)->outputLogic (outputPort->index ());
82
- currentLogElm ->connectPredecessor (inputIndex, logic , 0 );
81
+ auto *predecessorLogic = qobject_cast<IC *>(predecessorElement)->outputLogic (outputPort->index ());
82
+ currentLogic ->connectPredecessor (inputIndex, predecessorLogic , 0 );
83
83
} else {
84
- currentLogElm ->connectPredecessor (inputIndex, predecessorElement->logic (), outputPort->index ());
84
+ currentLogic ->connectPredecessor (inputIndex, predecessorElement->logic (), outputPort->index ());
85
85
}
86
86
}
87
87
}
0 commit comments