From 97d7fb425da906947cc45e11fadb35f708da50d6 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 7 Feb 2018 14:13:32 -0500 Subject: Changed EntityManager to dense vector This should improve speed, because entity lookup will be O(1) instead of O(log n). Deletion is also O(1). Insert stays at potentially O(n), but still should be overall faster than the previous method. Also replaced some asserts with exceptions. Also made Component polymorphic so that deletion actually works properly. --- src/component.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/component.h') diff --git a/src/component.h b/src/component.h index 2cbdc9d..b81dbee 100644 --- a/src/component.h +++ b/src/component.h @@ -2,6 +2,10 @@ #define COMPONENT_H_F0CE4573 class Component { +public: + + virtual ~Component() = default; + }; #endif /* end of include guard: COMPONENT_H_F0CE4573 */ -- cgit 1.4.1