From 22a7e9f3c40b4b6eb68a5343e4870e76c4bfcf63 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 20 Nov 2024 14:24:08 +0100 Subject: process feedback on #39 --- src/crepe/ComponentManager.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/crepe/ComponentManager.hpp') diff --git a/src/crepe/ComponentManager.hpp b/src/crepe/ComponentManager.hpp index be99cac..4d5eaf4 100644 --- a/src/crepe/ComponentManager.hpp +++ b/src/crepe/ComponentManager.hpp @@ -81,15 +81,14 @@ void ComponentManager::delete_components() { } template -std::vector> -ComponentManager::get_components_by_id(game_object_id_t id) const { +RefVector ComponentManager::get_components_by_id(game_object_id_t id) const { using namespace std; // Determine the type of T (this is used as the key of the unordered_map<>) type_index type = typeid(T); // Create an empty vector<> - vector> component_vector; + RefVector component_vector; if (this->components.find(type) == this->components.end()) return component_vector; @@ -114,14 +113,14 @@ ComponentManager::get_components_by_id(game_object_id_t id) const { } template -std::vector> ComponentManager::get_components_by_type() const { +RefVector ComponentManager::get_components_by_type() const { using namespace std; // Determine the type of T (this is used as the key of the unordered_map<>) type_index type = typeid(T); // Create an empty vector<> - vector> component_vector; + RefVector component_vector; // Find the type (in the unordered_map<>) if (this->components.find(type) == this->components.end()) return component_vector; -- cgit v1.2.3