From 801be9bd006a5f9f24a76067113bf1fd756aabbd Mon Sep 17 00:00:00 2001 From: max-001 Date: Thu, 21 Nov 2024 08:47:36 +0100 Subject: Replaced Scene's name variable with get_name() method --- src/crepe/api/SceneManager.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/crepe/api/SceneManager.hpp') diff --git a/src/crepe/api/SceneManager.hpp b/src/crepe/api/SceneManager.hpp index 714f690..94e5946 100644 --- a/src/crepe/api/SceneManager.hpp +++ b/src/crepe/api/SceneManager.hpp @@ -5,16 +5,16 @@ namespace crepe { template -void SceneManager::add_scene(const std::string & name) { +void SceneManager::add_scene() { using namespace std; static_assert(is_base_of::value, "T must be derived from Scene"); - Scene * scene = new T(this->component_manager, name); + Scene * scene = new T(this->component_manager); this->scenes.emplace_back(unique_ptr(scene)); // The first scene added, is the one that will be loaded at the beginning if (next_scene.empty()) { - next_scene = name; + next_scene = scene->get_name(); } } -- cgit v1.2.3