diff options
| author | skal <pascal.massimino@gmail.com> | 2026-01-31 21:11:11 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-01-31 21:11:11 +0100 |
| commit | 25e693cc46324b4ec588530de542bba8af6f47c6 (patch) | |
| tree | 8a959e442f9330dd3f881fe4109e83b831f25a7e /src/gpu/effect.cc | |
| parent | 9379697ccdf6f44ade7933d5635f72f644f6b92e (diff) | |
style: add vertical compression rules to clang-format
- Enabled AllowShortFunctionsOnASingleLine: All
- Enabled AllowShortBlocksOnASingleLine: Always
- Enabled AllowShortIfStatementsOnASingleLine: Always
- Enabled AllowShortLoopsOnASingleLine: true
- Set MaxEmptyLinesToKeep: 1
- Applied formatting to all source files.
Diffstat (limited to 'src/gpu/effect.cc')
| -rw-r--r-- | src/gpu/effect.cc | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/gpu/effect.cc b/src/gpu/effect.cc index f9ebf0c..054c0ef 100644 --- a/src/gpu/effect.cc +++ b/src/gpu/effect.cc @@ -35,8 +35,7 @@ void Sequence::add_effect(std::shared_ptr<Effect> effect, float start_time, } void Sequence::sort_items() { - if (is_sorted_) - return; + if (is_sorted_) return; std::sort(items_.begin(), items_.end(), [](const SequenceItem &a, const SequenceItem &b) { return a.priority < b.priority; @@ -130,9 +129,7 @@ void MainSequence::init(WGPUDevice d, WGPUQueue q, WGPUTextureFormat f, create_framebuffers(width, height); passthrough_effect_ = std::make_unique<PassthroughEffect>(device, format); - for (auto &entry : sequences_) { - entry.seq->init(this); - } + for (auto &entry : sequences_) { entry.seq->init(this); } } void MainSequence::add_sequence(std::shared_ptr<Sequence> seq, float start_time, @@ -259,17 +256,11 @@ void MainSequence::render_frame(float global_time, float beat, float peak, } void MainSequence::shutdown() { - if (framebuffer_view_a_) - wgpuTextureViewRelease(framebuffer_view_a_); - if (framebuffer_a_) - wgpuTextureRelease(framebuffer_a_); - if (framebuffer_view_b_) - wgpuTextureViewRelease(framebuffer_view_b_); - if (framebuffer_b_) - wgpuTextureRelease(framebuffer_b_); - for (auto &entry : sequences_) { - entry.seq->reset(); - } + if (framebuffer_view_a_) wgpuTextureViewRelease(framebuffer_view_a_); + if (framebuffer_a_) wgpuTextureRelease(framebuffer_a_); + if (framebuffer_view_b_) wgpuTextureViewRelease(framebuffer_view_b_); + if (framebuffer_b_) wgpuTextureRelease(framebuffer_b_); + for (auto &entry : sequences_) { entry.seq->reset(); } } #ifndef STRIP_ALL |
