From ca76ce4b45684ad87c2dd06732467b2c4b5d024c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 10 Jul 2020 12:27:21 -0400 Subject: [PATCH] CEditLinkCommand: Make use of push_back over operator<< --- src/Editor/Undo/CEditLinkCommand.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Editor/Undo/CEditLinkCommand.cpp b/src/Editor/Undo/CEditLinkCommand.cpp index 1c9f8baa..820937a2 100644 --- a/src/Editor/Undo/CEditLinkCommand.cpp +++ b/src/Editor/Undo/CEditLinkCommand.cpp @@ -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()