diff --git a/src/ecs/ecs.hpp b/src/ecs/ecs.hpp index d448479..5f5c313 100644 --- a/src/ecs/ecs.hpp +++ b/src/ecs/ecs.hpp @@ -119,7 +119,6 @@ class ECS void updateSystems(ECSSystemList& systems, float delta); private: - Array systems; Map> components; Array > >* > entities; diff --git a/src/ecs/ecsSystem.cpp b/src/ecs/ecsSystem.cpp index 98738ba..79267d0 100644 --- a/src/ecs/ecsSystem.cpp +++ b/src/ecs/ecsSystem.cpp @@ -1,6 +1,6 @@ #include "ecsSystem.hpp" -bool BaseECSSystem::isValid() +bool BaseECSSystem::isValid() const { for(uint32 i = 0; i < componentFlags.size(); i++) { if((componentFlags[i] & BaseECSSystem::FLAG_OPTIONAL) == 0) { diff --git a/src/ecs/ecsSystem.hpp b/src/ecs/ecsSystem.hpp index 15b29bd..c8d90d9 100644 --- a/src/ecs/ecsSystem.hpp +++ b/src/ecs/ecsSystem.hpp @@ -11,15 +11,15 @@ class BaseECSSystem }; BaseECSSystem() {} virtual void updateComponents(float delta, BaseECSComponent** components) {} - const Array& getComponentTypes() + const Array& getComponentTypes() const { return componentTypes; } - const Array& getComponentFlags() + const Array& getComponentFlags() const { return componentFlags; } - bool isValid(); + bool isValid() const; protected: void addComponentType(uint32 componentType, uint32 componentFlag = 0) { @@ -42,7 +42,7 @@ class ECSSystemList systems.push_back(&system); return true; } - inline size_t size() { + inline size_t size() const { return systems.size(); } inline BaseECSSystem* operator[](uint32 index) {