From d21afe5b33b4cb3f5cf1917f4d15f402de41a032 Mon Sep 17 00:00:00 2001 From: max-001 Date: Wed, 16 Oct 2024 17:05:46 +0200 Subject: Make format --- src/crepe/ComponentManager.hpp | 3 ++- src/crepe/Script.cpp | 5 ++--- src/crepe/Script.h | 3 +-- src/crepe/ScriptSystem.cpp | 13 +++---------- src/crepe/ScriptSystem.h | 3 +-- src/crepe/System.h | 7 +++---- src/crepe/api/BehaviorScript.cpp | 5 +---- src/crepe/api/BehaviorScript.h | 5 ++--- src/example/script.cpp | 9 +++------ 9 files changed, 18 insertions(+), 35 deletions(-) (limited to 'src') diff --git a/src/crepe/ComponentManager.hpp b/src/crepe/ComponentManager.hpp index 084cd33..2ea0c70 100644 --- a/src/crepe/ComponentManager.hpp +++ b/src/crepe/ComponentManager.hpp @@ -10,7 +10,8 @@ template void ComponentManager::add_component(uint32_t id, Args &&... args) { using namespace std; - static_assert(is_base_of::value, "add_component must recieve a derivative class of Component"); + static_assert(is_base_of::value, + "add_component must recieve a derivative class of Component"); // Determine the type of T (this is used as the key of the unordered_map<>) type_index type = typeid(T); diff --git a/src/crepe/Script.cpp b/src/crepe/Script.cpp index 42e3666..3b83b7c 100644 --- a/src/crepe/Script.cpp +++ b/src/crepe/Script.cpp @@ -2,6 +2,5 @@ using namespace crepe; -void Script::init() { } -void Script::update() { } - +void Script::init() {} +void Script::update() {} diff --git a/src/crepe/Script.h b/src/crepe/Script.h index ba4073a..cdd6814 100644 --- a/src/crepe/Script.h +++ b/src/crepe/Script.h @@ -12,5 +12,4 @@ protected: // added event. }; -} - +} // namespace crepe diff --git a/src/crepe/ScriptSystem.cpp b/src/crepe/ScriptSystem.cpp index e301c71..988bb71 100644 --- a/src/crepe/ScriptSystem.cpp +++ b/src/crepe/ScriptSystem.cpp @@ -4,19 +4,12 @@ using namespace crepe; -ScriptSystem::ScriptSystem() { - dbg_trace(); -} -ScriptSystem::~ScriptSystem() { - dbg_trace(); -} +ScriptSystem::ScriptSystem() { dbg_trace(); } +ScriptSystem::~ScriptSystem() { dbg_trace(); } ScriptSystem & ScriptSystem::get_instance() { static ScriptSystem instance; return instance; } -void ScriptSystem::update() { - dbg_trace(); -} - +void ScriptSystem::update() { dbg_trace(); } diff --git a/src/crepe/ScriptSystem.h b/src/crepe/ScriptSystem.h index e1ed290..72e360b 100644 --- a/src/crepe/ScriptSystem.h +++ b/src/crepe/ScriptSystem.h @@ -14,5 +14,4 @@ private: ~ScriptSystem(); }; -} - +} // namespace crepe diff --git a/src/crepe/System.h b/src/crepe/System.h index 3fe3d66..8744920 100644 --- a/src/crepe/System.h +++ b/src/crepe/System.h @@ -8,8 +8,8 @@ public: virtual void update() = 0; protected: - System() { }; - virtual ~System() { }; + System(){}; + virtual ~System(){}; private: // singleton @@ -19,5 +19,4 @@ private: System & operator=(System &&) = delete; }; -} - +} // namespace crepe diff --git a/src/crepe/api/BehaviorScript.cpp b/src/crepe/api/BehaviorScript.cpp index 2dd933e..84bfd4c 100644 --- a/src/crepe/api/BehaviorScript.cpp +++ b/src/crepe/api/BehaviorScript.cpp @@ -4,7 +4,4 @@ using namespace crepe::api; -BehaviorScript::BehaviorScript() { - dbg_trace(); -} - +BehaviorScript::BehaviorScript() { dbg_trace(); } diff --git a/src/crepe/api/BehaviorScript.h b/src/crepe/api/BehaviorScript.h index e9542c1..1d05a75 100644 --- a/src/crepe/api/BehaviorScript.h +++ b/src/crepe/api/BehaviorScript.h @@ -1,7 +1,7 @@ #pragma once -#include "../Script.h" #include "../Component.h" +#include "../Script.h" namespace crepe::api { @@ -13,5 +13,4 @@ protected: BehaviorScript(); }; -} - +} // namespace crepe::api diff --git a/src/example/script.cpp b/src/example/script.cpp index 28605c7..a610b83 100644 --- a/src/example/script.cpp +++ b/src/example/script.cpp @@ -3,10 +3,10 @@ * Standalone example for usage of the script component and system */ -#include -#include #include #include +#include +#include #include @@ -14,9 +14,7 @@ using namespace crepe; using namespace std; class MyScript : public api::BehaviorScript { - void update() { - dbg_trace(); - } + void update() { dbg_trace(); } }; int main() { @@ -30,4 +28,3 @@ int main() { return 0; } - -- cgit v1.2.3