General: Make use of ranged for where applicable

This commit is contained in:
Lioncash
2020-06-28 17:30:49 -04:00
parent 9bc2723498
commit ec66d7af9d
25 changed files with 162 additions and 147 deletions

View File

@@ -13,7 +13,7 @@ CScaleNodeCommand::CScaleNodeCommand(INodeEditor *pEditor, const QList<CSceneNod
{
mNodeList.reserve(rkNodes.size());
foreach (CSceneNode *pNode, rkNodes)
for (CSceneNode *pNode : rkNodes)
{
SNodeScale Scale;
Scale.pNode = pNode;
@@ -74,9 +74,10 @@ bool CScaleNodeCommand::mergeWith(const QUndoCommand *pkOther)
void CScaleNodeCommand::undo()
{
if (!mpEditor) return;
if (!mpEditor)
return;
foreach (SNodeScale Scale, mNodeList)
for (SNodeScale& Scale : mNodeList)
{
Scale.pNode->SetPosition(Scale.InitialPos);
Scale.pNode->SetScale(Scale.InitialScale);
@@ -88,9 +89,10 @@ void CScaleNodeCommand::undo()
void CScaleNodeCommand::redo()
{
if (!mpEditor) return;
if (!mpEditor)
return;
foreach (SNodeScale Scale, mNodeList)
for (SNodeScale& Scale : mNodeList)
{
Scale.pNode->SetPosition(Scale.NewPos);
Scale.pNode->SetScale(Scale.NewScale);