CAnimEventData: Collapse for loop into a ranged for loop
This commit is contained in:
parent
044efcf59d
commit
eb8ca98a8a
|
@ -23,21 +23,20 @@ public:
|
||||||
|
|
||||||
CDependencyTree* BuildDependencyTree() const override
|
CDependencyTree* BuildDependencyTree() const override
|
||||||
{
|
{
|
||||||
CDependencyTree *pTree = new CDependencyTree();
|
auto *pTree = new CDependencyTree();
|
||||||
AddDependenciesToTree(pTree);
|
AddDependenciesToTree(pTree);
|
||||||
return pTree;
|
return pTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddDependenciesToTree(CDependencyTree *pTree) const
|
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 = event.mAssetRef;
|
||||||
CAssetID ID = rkEvent.mAssetRef;
|
|
||||||
|
|
||||||
if (ID.IsValid() && !pTree->HasDependency(ID))
|
if (ID.IsValid() && !pTree->HasDependency(ID))
|
||||||
{
|
{
|
||||||
CAnimEventDependency *pDep = new CAnimEventDependency(ID, rkEvent.mCharacterIndex);
|
auto *pDep = new CAnimEventDependency(ID, event.mCharacterIndex);
|
||||||
pTree->AddChild(pDep);
|
pTree->AddChild(pDep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue