MCPcopy Create free account
hub / github.com/LMMS/lmms / finalizeConnections

Method finalizeConnections

src/core/ControllerConnection.cpp:154–171  ·  view source on GitHub ↗

* A connection may not be finalized. This means, the connection should exist, * but the controller does not yet exist. This happens when loading. Even * loading connections last won't help, since there can be connections BETWEEN * controllers. So, we remember the controller-ID and use a dummyController * instead. Once the song is loaded, finalizeConnections() connects to the proper control

Source from the content-addressed store, hash-verified

152 * instead. Once the song is loaded, finalizeConnections() connects to the proper controllers
153 */
154void ControllerConnection::finalizeConnections()
155{
156 for( int i = 0; i < s_connections.size(); ++i )
157 {
158 ControllerConnection * c = s_connections[i];
159 if ( !c->isFinalized() && c->m_controllerId <
160 Engine::getSong()->controllers().size() )
161 {
162 c->setController( Engine::getSong()->
163 controllers().at( c->m_controllerId ) );
164 }
165 else if (c->getController()->type() == Controller::DummyController)
166 {
167 delete c;
168 --i;
169 }
170 }
171}
172
173
174

Callers

nothing calls this directly

Calls 5

getSongFunction · 0.85
getControllerMethod · 0.80
sizeMethod · 0.45
setControllerMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected