From e2c27d8c99a71e5d94ffe49027ec13afeb74b021 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 20 Nov 2024 14:59:34 +0100 Subject: replace more vector> with RefVector --- src/crepe/api/Script.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/crepe/api/Script.hpp') diff --git a/src/crepe/api/Script.hpp b/src/crepe/api/Script.hpp index a064a90..a85d814 100644 --- a/src/crepe/api/Script.hpp +++ b/src/crepe/api/Script.hpp @@ -10,7 +10,7 @@ namespace crepe { template T & Script::get_component() const { using namespace std; - vector> all_components = this->get_components(); + RefVector all_components = this->get_components(); if (all_components.size() < 1) throw runtime_error( format("Script: no component found with type = {}", typeid(T).name())); @@ -19,9 +19,8 @@ T & Script::get_component() const { } template -std::vector> Script::get_components() const { +RefVector Script::get_components() const { auto & mgr = *this->component_manager_ref; - return mgr.get_components_by_id(this->game_object_id); } -- cgit v1.2.3