From a47b981c2254e1d49f58ebd4244c1be4624ba998 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Tue, 5 Nov 2024 15:49:59 +0100 Subject: remove util and api namespaces --- src/crepe/api/AssetManager.cpp | 2 +- src/crepe/api/AssetManager.h | 4 ++-- src/crepe/api/AssetManager.hpp | 4 ++-- src/crepe/api/AudioSource.cpp | 2 +- src/crepe/api/AudioSource.h | 8 +++----- src/crepe/api/BehaviorScript.h | 4 ++-- src/crepe/api/BehaviorScript.hpp | 4 ++-- src/crepe/api/CircleCollider.h | 4 ++-- src/crepe/api/Color.cpp | 2 +- src/crepe/api/Color.h | 4 ++-- src/crepe/api/Config.h | 6 +++--- src/crepe/api/Force.cpp | 4 ++-- src/crepe/api/Force.h | 4 ++-- src/crepe/api/GameObject.cpp | 2 +- src/crepe/api/GameObject.h | 4 ++-- src/crepe/api/GameObject.hpp | 4 ++-- src/crepe/api/Point.h | 4 ++-- src/crepe/api/Rigidbody.cpp | 2 +- src/crepe/api/Rigidbody.h | 4 ++-- src/crepe/api/Script.cpp | 2 +- src/crepe/api/Script.h | 6 +++--- src/crepe/api/Script.hpp | 4 ++-- src/crepe/api/Sprite.cpp | 5 ++--- src/crepe/api/Sprite.h | 4 ++-- src/crepe/api/Texture.cpp | 6 +++--- src/crepe/api/Texture.h | 4 ++-- src/crepe/api/Transform.cpp | 2 +- src/crepe/api/Transform.h | 4 ++-- 28 files changed, 53 insertions(+), 56 deletions(-) (limited to 'src/crepe/api') diff --git a/src/crepe/api/AssetManager.cpp b/src/crepe/api/AssetManager.cpp index 560df6c..b891760 100644 --- a/src/crepe/api/AssetManager.cpp +++ b/src/crepe/api/AssetManager.cpp @@ -2,7 +2,7 @@ #include "AssetManager.h" -using namespace crepe::api; +using namespace crepe; AssetManager & AssetManager::get_instance() { static AssetManager instance; diff --git a/src/crepe/api/AssetManager.h b/src/crepe/api/AssetManager.h index 3e72a49..fefbed9 100644 --- a/src/crepe/api/AssetManager.h +++ b/src/crepe/api/AssetManager.h @@ -5,7 +5,7 @@ #include #include -namespace crepe::api { +namespace crepe { class AssetManager { @@ -30,6 +30,6 @@ public: bool reload = false); }; -} // namespace crepe::api +} // namespace crepe #include "AssetManager.hpp" diff --git a/src/crepe/api/AssetManager.hpp b/src/crepe/api/AssetManager.hpp index 468724c..977b4e1 100644 --- a/src/crepe/api/AssetManager.hpp +++ b/src/crepe/api/AssetManager.hpp @@ -2,7 +2,7 @@ #include "AssetManager.h" -namespace crepe::api { +namespace crepe { template std::shared_ptr AssetManager::cache(const std::string & file_path, @@ -21,4 +21,4 @@ std::shared_ptr AssetManager::cache(const std::string & file_path, return new_asset; } -} // namespace crepe::api +} // namespace crepe diff --git a/src/crepe/api/AudioSource.cpp b/src/crepe/api/AudioSource.cpp index 35b8d83..2bacc75 100644 --- a/src/crepe/api/AudioSource.cpp +++ b/src/crepe/api/AudioSource.cpp @@ -4,7 +4,7 @@ #include "AudioSource.h" -using namespace crepe::api; +using namespace crepe; AudioSource::AudioSource(std::unique_ptr audio_clip) { this->sound = std::make_unique(std::move(audio_clip)); diff --git a/src/crepe/api/AudioSource.h b/src/crepe/api/AudioSource.h index 7980212..42add50 100644 --- a/src/crepe/api/AudioSource.h +++ b/src/crepe/api/AudioSource.h @@ -6,10 +6,8 @@ #include "../Component.h" namespace crepe { -class Sound; -} -namespace crepe::api { +class Sound; //! Audio source component class AudioSource : Component { @@ -35,7 +33,7 @@ public: float volume; private: - std::unique_ptr sound; + std::unique_ptr sound; }; -} // namespace crepe::api +} // namespace crepe diff --git a/src/crepe/api/BehaviorScript.h b/src/crepe/api/BehaviorScript.h index 6133cc8..21638f4 100644 --- a/src/crepe/api/BehaviorScript.h +++ b/src/crepe/api/BehaviorScript.h @@ -9,7 +9,7 @@ class ScriptSystem; class ComponentManager; } // namespace crepe -namespace crepe::api { +namespace crepe { class Script; @@ -30,6 +30,6 @@ protected: std::unique_ptr