diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/crepe/api/LoopManager.h | 2 | ||||
-rw-r--r-- | src/crepe/manager/SaveManager.cpp | 6 | ||||
-rw-r--r-- | src/crepe/manager/SaveManager.h | 5 | ||||
-rw-r--r-- | src/crepe/system/AudioSystem.cpp | 3 |
4 files changed, 7 insertions, 9 deletions
diff --git a/src/crepe/api/LoopManager.h b/src/crepe/api/LoopManager.h index 33a61a3..700afe4 100644 --- a/src/crepe/api/LoopManager.h +++ b/src/crepe/api/LoopManager.h @@ -5,8 +5,8 @@ #include "../facade/SDLContext.h" #include "../manager/ComponentManager.h" #include "../manager/ResourceManager.h" -#include "../manager/SceneManager.h" #include "../manager/SaveManager.h" +#include "../manager/SceneManager.h" #include "../system/System.h" #include "LoopTimer.h" diff --git a/src/crepe/manager/SaveManager.cpp b/src/crepe/manager/SaveManager.cpp index 39b92d4..691ea2f 100644 --- a/src/crepe/manager/SaveManager.cpp +++ b/src/crepe/manager/SaveManager.cpp @@ -14,10 +14,8 @@ SaveManager::SaveManager(Mediator & mediator) : Manager(mediator) { DB & SaveManager::get_db() { if (this->db == nullptr) { Config & cfg = Config::get_instance(); - this->db = { - new DB(cfg.savemgr.location), - [](void * db){ delete static_cast<DB *>(db); } - }; + this->db + = {new DB(cfg.savemgr.location), [](void * db) { delete static_cast<DB *>(db); }}; } return *static_cast<DB *>(this->db.get()); } diff --git a/src/crepe/manager/SaveManager.h b/src/crepe/manager/SaveManager.h index 27e625c..61a978d 100644 --- a/src/crepe/manager/SaveManager.h +++ b/src/crepe/manager/SaveManager.h @@ -1,7 +1,7 @@ #pragma once -#include <memory> #include <functional> +#include <memory> #include "../ValueBroker.h" @@ -95,9 +95,10 @@ private: protected: //! Create or return DB virtual DB & get_db(); + private: //! Database - std::unique_ptr<void, std::function<void(void*)>> db = nullptr; + std::unique_ptr<void, std::function<void(void *)>> db = nullptr; }; } // namespace crepe diff --git a/src/crepe/system/AudioSystem.cpp b/src/crepe/system/AudioSystem.cpp index ddba268..b1aa0f8 100644 --- a/src/crepe/system/AudioSystem.cpp +++ b/src/crepe/system/AudioSystem.cpp @@ -30,8 +30,7 @@ void AudioSystem::diff_update(AudioSource & component, Sound & resource) { context.stop(component.voice); return; } - if (component.play_on_awake) - component.oneshot_play = true; + if (component.play_on_awake) component.oneshot_play = true; } if (!component.active) return; |