From 2fce3e3985302544827f6bf4dcc3a46cae3f2fd1 Mon Sep 17 00:00:00 2001 From: max-001 Date: Wed, 6 Nov 2024 10:06:15 +0100 Subject: Used const references instead of pass by value --- src/crepe/api/SceneManager.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/crepe/api/SceneManager.hpp') diff --git a/src/crepe/api/SceneManager.hpp b/src/crepe/api/SceneManager.hpp index 7789823..82787ed 100644 --- a/src/crepe/api/SceneManager.hpp +++ b/src/crepe/api/SceneManager.hpp @@ -1,11 +1,12 @@ #include "SceneManager.h" -using namespace crepe; -using namespace std; +namespace crepe { // Add a new concrete scene to the scene manager template -void SceneManager::add_scene(string name) { - static_assert(is_base_of::value, "T must be derived from Scene"); +void SceneManager::add_scene(const std::string & name) { + static_assert(std::is_base_of::value, "T must be derived from Scene"); scenes.emplace_back(make_unique(name)); } + +} // namespace crepe -- cgit v1.2.3