From eb8ca98a8a1fb84f1167179ecd4724ed76f3c645 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 11 Jun 2020 18:02:52 -0400 Subject: [PATCH] CAnimEventData: Collapse for loop into a ranged for loop --- src/Core/Resource/Animation/CAnimEventData.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Core/Resource/Animation/CAnimEventData.h b/src/Core/Resource/Animation/CAnimEventData.h index 0afc4cd0..849499b6 100644 --- a/src/Core/Resource/Animation/CAnimEventData.h +++ b/src/Core/Resource/Animation/CAnimEventData.h @@ -23,21 +23,20 @@ public: CDependencyTree* BuildDependencyTree() const override { - CDependencyTree *pTree = new CDependencyTree(); + auto *pTree = new CDependencyTree(); AddDependenciesToTree(pTree); return pTree; } void AddDependenciesToTree(CDependencyTree *pTree) const { - for (uint32 iEvt = 0; iEvt < mEvents.size(); iEvt++) + for (const SEvent& event : mEvents) { - const SEvent& rkEvent = mEvents[iEvt]; - CAssetID ID = rkEvent.mAssetRef; + CAssetID ID = event.mAssetRef; if (ID.IsValid() && !pTree->HasDependency(ID)) { - CAnimEventDependency *pDep = new CAnimEventDependency(ID, rkEvent.mCharacterIndex); + auto *pDep = new CAnimEventDependency(ID, event.mCharacterIndex); pTree->AddChild(pDep); } }