CEditLinkCommand: Make use of push_back over operator<<

This commit is contained in:
Lioncash 2020-07-10 12:27:21 -04:00
parent 26a8c6529f
commit ca76ce4b45
1 changed files with 10 additions and 4 deletions

View File

@ -10,10 +10,16 @@ CEditLinkCommand::CEditLinkCommand(CWorldEditor *pEditor, CLink *pLink, CLink Ne
mOldSenderIndex = pLink->SenderIndex();
mOldReceiverIndex = pLink->ReceiverIndex();
mAffectedInstances << pLink->Sender();
if (pLink->ReceiverID() != pLink->SenderID()) mAffectedInstances << pLink->Receiver();
if (NewLink.SenderID() != pLink->SenderID()) mAffectedInstances << NewLink.Sender();
if (NewLink.ReceiverID() != pLink->ReceiverID()) mAffectedInstances << NewLink.Receiver();
mAffectedInstances.push_back(pLink->Sender());
if (pLink->ReceiverID() != pLink->SenderID())
mAffectedInstances.push_back(pLink->Receiver());
if (NewLink.SenderID() != pLink->SenderID())
mAffectedInstances.push_back(NewLink.Sender());
if (NewLink.ReceiverID() != pLink->ReceiverID())
mAffectedInstances.push_back(NewLink.Receiver());
}
void CEditLinkCommand::undo()