CCloneSelectionCommand: Make use of STL named functions

This commit is contained in:
Lioncash 2020-07-03 22:13:33 -04:00
parent a6f224b346
commit c8db5e2581
1 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@ CCloneSelectionCommand::CCloneSelectionCommand(INodeEditor *pEditor)
{ {
if (It->NodeType() == ENodeType::Script) if (It->NodeType() == ENodeType::Script)
{ {
mNodesToClone << *It; mNodesToClone.push_back(*It);
// Fetch linked objects // Fetch linked objects
CScriptNode *pScript = static_cast<CScriptNode*>(*It); CScriptNode *pScript = static_cast<CScriptNode*>(*It);
@ -22,7 +22,7 @@ CCloneSelectionCommand::CCloneSelectionCommand(INodeEditor *pEditor)
CScriptNode *pNode = mpEditor->Scene()->NodeForInstance(pInst->Link(ELinkType::Outgoing, iLink)->Receiver()); CScriptNode *pNode = mpEditor->Scene()->NodeForInstance(pInst->Link(ELinkType::Outgoing, iLink)->Receiver());
if (!pNode->IsSelected()) if (!pNode->IsSelected())
mLinkedInstances << pNode->Instance(); mLinkedInstances.push_back(pNode->Instance());
} }
} }
} }
@ -72,10 +72,10 @@ void CCloneSelectionCommand::redo()
pCloneNode->SetRotation(pScript->LocalRotation()); pCloneNode->SetRotation(pScript->LocalRotation());
pCloneNode->SetScale(pScript->LocalScale()); pCloneNode->SetScale(pScript->LocalScale());
ToCloneInstanceIDs << pInstance->InstanceID(); ToCloneInstanceIDs.push_back(pInstance->InstanceID());
ClonedInstanceIDs << pCloneInst->InstanceID(); ClonedInstanceIDs.push_back(pCloneInst->InstanceID());
ClonedNodes << pCloneNode; ClonedNodes.push_back(pCloneNode);
mClonedNodes << pCloneNode; mClonedNodes.push_back(pCloneNode);
mpEditor->NotifyNodeSpawned(pCloneNode); mpEditor->NotifyNodeSpawned(pCloneNode);
} }