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

@@ -21,7 +21,7 @@ CRotateNodeCommand::CRotateNodeCommand(
{
mNodeList.reserve(rkNodes.size());
foreach (CSceneNode *pNode, rkNodes)
for (CSceneNode *pNode : rkNodes)
{
SNodeRotate Rotate;
Rotate.pNode = pNode;
@@ -83,7 +83,7 @@ void CRotateNodeCommand::undo()
{
if (!mpEditor) return;
foreach (SNodeRotate Rotate, mNodeList)
for (SNodeRotate& Rotate : mNodeList)
{
Rotate.pNode->SetPosition(Rotate.InitialPos);
Rotate.pNode->SetRotation(Rotate.InitialRot);
@@ -97,7 +97,7 @@ void CRotateNodeCommand::redo()
{
if (!mpEditor) return;
foreach (SNodeRotate Rotate, mNodeList)
for (SNodeRotate& Rotate : mNodeList)
{
Rotate.pNode->SetPosition(Rotate.NewPos);
Rotate.pNode->SetRotation(Rotate.NewRot);