From 445937aecf1fda473802c2cfee29411e805f3971 Mon Sep 17 00:00:00 2001 From: Ubpa <641614112@qq.com> Date: Fri, 5 Jun 2020 10:57:37 +0800 Subject: [PATCH] fix bug --- include/UECS/EntityLocator.h | 5 ----- src/core/World.cpp | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/UECS/EntityLocator.h b/include/UECS/EntityLocator.h index 58fa484..e2f06d8 100644 --- a/include/UECS/EntityLocator.h +++ b/include/UECS/EntityLocator.h @@ -27,11 +27,6 @@ namespace Ubpa { const std::set& LatestCmptTypes() const noexcept { return latestCmptTypes; } const std::set& CmptTypes() const noexcept { return cmptTypes; } - static const EntityLocator& InvalidInstance() noexcept { - static EntityLocator invalid_instance{ TypeList{}, TypeList{}, TypeList{} }; - return invalid_instance; - } - bool operator==(const EntityLocator& locator) const noexcept; private: size_t GenHashCode() const noexcept; diff --git a/src/core/World.cpp b/src/core/World.cpp index 55b1148..6a955bb 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -22,7 +22,7 @@ void World::Update() { if (!func->IsJob()) entityMngr.GenJob(job, func); else - job->emplace([func = func]() { (*func)(Entity::Invalid(), size_t_invalid, &EntityLocator::InvalidInstance(), nullptr); }); + job->emplace([func = func]() { (*func)(Entity::Invalid(), size_t_invalid, RTDCmptsView{ nullptr,nullptr }); }); table[func] = jobGraph.composed_of(*job); }