From 09e877f25bb38fe2f690f9c3b05f6465ef3cf56e Mon Sep 17 00:00:00 2001 From: badcast Date: Tue, 24 Dec 2024 14:02:34 +0500 Subject: [PATCH] Fix: Ref class from World object. --- include/ronin/World.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/ronin/World.h b/include/ronin/World.h index 3ff5bda..acbaf13 100644 --- a/include/ronin/World.h +++ b/include/ronin/World.h @@ -38,7 +38,7 @@ namespace RoninEngine::Runtime std::list GetAllComponents(); template - std::list FindObjectsWithType(); + std::list> FindObjectsWithType(); const bool CancelObjectDestruction(GameObjectRef obj); const int CostObjectDestruction(GameObjectRef obj); @@ -60,14 +60,14 @@ namespace RoninEngine::Runtime }; template - std::list World::FindObjectsWithType() + std::list> World::FindObjectsWithType() { - T *_target; - std::list __classes; - std::list __compr = GetAllComponents(); + Ref _target; + std::list> __classes; + std::list __compr = GetAllComponents(); for(auto iter = __compr.begin(); iter != __compr.end(); ++iter) { - if((_target = dynamic_cast(*iter))) + if((_target = DynamicCast(*iter))) { __classes.emplace_back(_target); }