| | |
| | | temp.push_back(p); |
| | | } |
| | | } |
| | | |
| | | m_processJobs = temp; |
| | | |
| | | |
| | | // 更新context |
| | | std::vector<uint8_t> newSlots; |
| | | std::vector<void*> newContexts; |
| | | for (auto pj : m_processJobs) { |
| | | for (auto& c : pj->carriers()) { |
| | | auto pPort = getPortWithCarrierId(c.carrierId); |
| | | if (pPort == nullptr) continue; |
| | | |
| | | for (auto s : c.slots) { |
| | | auto pGlass = pPort->getGlassFromSlot(s); |
| | | if (pGlass == nullptr) continue; |
| | | |
| | | newSlots.push_back(s); |
| | | newContexts.push_back(pGlass); |
| | | } |
| | | |
| | | pj->setCarrierSlotsAndContexts(c.carrierId, newSlots, newContexts); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | this->saveState(); |
| | | |
| | | return (int)m_processJobs.size(); |