- }
- else if (newIt == newRouters.end())
- {
- obj.SendDirect(val.first, val.second, *oldIt, true); // Disconnect on old router
- ++oldIt;
- }
- else if (*oldIt < *newIt)
- {
- obj.SendDirect(val.first, val.second, *oldIt, true); // Disconnect on old router
- ++oldIt;
- }
- else if (*oldIt > *newIt)
- {
- obj.SendDirect(val.first, val.second, *newIt); // Connect on new router
- ++newIt;
- }
- else
- {
- if (oldIt != val.second.routers.end())
+ else if (newIt == newRouters.end())
+ {
+ obj.SendDirect(val.second, *oldIt, true); // Disconnect on old router