From 7000aa712b85f0004189574121e7ec4590b70b72 Mon Sep 17 00:00:00 2001 From: cat Date: Wed, 28 Jan 2026 14:02:28 +0200 Subject: [PATCH] Removing needless entity pointer storing in BaseComponent --- headers/Systems/ECS.hpp | 3 --- source/Systems/ECS/Component.cpp | 14 -------------- 2 files changed, 17 deletions(-) delete mode 100644 source/Systems/ECS/Component.cpp diff --git a/headers/Systems/ECS.hpp b/headers/Systems/ECS.hpp index d7c63d4..9e177a8 100644 --- a/headers/Systems/ECS.hpp +++ b/headers/Systems/ECS.hpp @@ -13,7 +13,6 @@ #include #include #include -#include #include "../Containers/DualkeyMap.hpp" #include "../Types.hpp" @@ -26,10 +25,8 @@ class World; struct BaseComponent { public: virtual ~BaseComponent() = default; - const Entity &GetOwner(); private: - const Entity *owner; friend World; }; diff --git a/source/Systems/ECS/Component.cpp b/source/Systems/ECS/Component.cpp deleted file mode 100644 index f727e3a..0000000 --- a/source/Systems/ECS/Component.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* - * SPDX-FileCopyrightText: Dora "cat" - * SPDX-License-Identifier: MPL-2.0 - * - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include - -using namespace Tourmaline::Systems::ECS; - -const Entity &BaseComponent::GetOwner() { return *this->owner; }