Skip to content

Commit

Permalink
Fix: Ref<T> class from World object.
Browse files Browse the repository at this point in the history
  • Loading branch information
badcast committed Dec 24, 2024
1 parent 30fc46c commit 09e877f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/ronin/World.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace RoninEngine::Runtime
std::list<ComponentRef> GetAllComponents();

template <typename T>
std::list<T *> FindObjectsWithType();
std::list<Ref<T>> FindObjectsWithType();

const bool CancelObjectDestruction(GameObjectRef obj);
const int CostObjectDestruction(GameObjectRef obj);
Expand All @@ -60,14 +60,14 @@ namespace RoninEngine::Runtime
};

template <typename T>
std::list<T *> World::FindObjectsWithType()
std::list<Ref<T>> World::FindObjectsWithType()
{
T *_target;
std::list<T *> __classes;
std::list<Component *> __compr = GetAllComponents();
Ref<T> _target;
std::list<Ref<T>> __classes;
std::list<ComponentRef> __compr = GetAllComponents();
for(auto iter = __compr.begin(); iter != __compr.end(); ++iter)
{
if((_target = dynamic_cast<T *>(*iter)))
if((_target = DynamicCast<T>(*iter)))
{
__classes.emplace_back(_target);
}
Expand Down

0 comments on commit 09e877f

Please sign in to comment.