MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / getNonSwappedCtrlsAndStates

Function getNonSwappedCtrlsAndStates

quest/src/core/localiser.cpp:241–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239
240
241auto getNonSwappedCtrlsAndStates(vector<int> oldCtrls, vector<int> oldStates, vector<int> newCtrls) {
242
243 vector<int> sameCtrls(0); sameCtrls .reserve(oldCtrls.size());
244 vector<int> sameStates(0); sameStates.reserve(oldStates.size());
245
246 for (size_t i=0; i<oldCtrls.size(); i++)
247 if (oldCtrls[i] == newCtrls[i]) {
248 sameCtrls .push_back(oldCtrls[i]);
249 sameStates.push_back(oldStates[i]);
250 }
251
252 return tuple{sameCtrls, sameStates};
253}
254
255
256

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected