diff options
Diffstat (limited to 'src/crepe/system/AudioSystem.cpp')
-rw-r--r-- | src/crepe/system/AudioSystem.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/crepe/system/AudioSystem.cpp b/src/crepe/system/AudioSystem.cpp index 84a101a..0696b34 100644 --- a/src/crepe/system/AudioSystem.cpp +++ b/src/crepe/system/AudioSystem.cpp @@ -10,7 +10,8 @@ using namespace std; void AudioSystem::update() { ComponentManager & component_manager = this->mediator.component_manager; ResourceManager & resource_manager = this->mediator.resource_manager; - RefVector<AudioSource> components = component_manager.get_components_by_type<AudioSource>(); + RefVector<AudioSource> components + = component_manager.get_components_by_type<AudioSource>(); for (AudioSource & component : components) { Sound & resource = resource_manager.get<Sound>(component.source); @@ -28,7 +29,8 @@ void AudioSystem::update() { } } -void AudioSystem::diff_update(AudioSource & component, ComponentPrivate & data, Sound & resource) { +void AudioSystem::diff_update(AudioSource & component, ComponentPrivate & data, + Sound & resource) { SoundContext & context = this->get_context(); if (component.active != data.last_active) { @@ -64,8 +66,6 @@ void AudioSystem::update_last(const AudioSource & component, ComponentPrivate & } SoundContext & AudioSystem::get_context() { - if (this->context.empty()) - this->context.set<SoundContext>(); + if (this->context.empty()) this->context.set<SoundContext>(); return this->context.get<SoundContext>(); } - |