From 25e693cc46324b4ec588530de542bba8af6f47c6 Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 31 Jan 2026 21:11:11 +0100 Subject: 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. --- src/gpu/demo_effects.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/gpu/demo_effects.cc') diff --git a/src/gpu/demo_effects.cc b/src/gpu/demo_effects.cc index 27712d3..77fb152 100644 --- a/src/gpu/demo_effects.cc +++ b/src/gpu/demo_effects.cc @@ -320,8 +320,7 @@ static void pp_update_bind_group(WGPUDevice device, WGPURenderPipeline pipeline, WGPUBindGroup *bind_group, WGPUTextureView input_view, GpuBuffer uniforms) { - if (*bind_group) - wgpuBindGroupRelease(*bind_group); + if (*bind_group) wgpuBindGroupRelease(*bind_group); WGPUBindGroupLayout bgl = wgpuRenderPipelineGetBindGroupLayout(pipeline, 0); WGPUSamplerDescriptor sd = {}; sd.magFilter = WGPUFilterMode_Linear; @@ -386,8 +385,7 @@ ParticleSprayEffect::ParticleSprayEffect(WGPUDevice device, WGPUQueue queue, gpu_create_buffer(device, sizeof(float) * 4, WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst); std::vector init_p(NUM_PARTICLES); - for (auto &p : init_p) - p.pos[3] = 0.0f; + for (auto &p : init_p) p.pos[3] = 0.0f; particles_buffer_ = gpu_create_buffer( device, sizeof(Particle) * NUM_PARTICLES, WGPUBufferUsage_Storage | WGPUBufferUsage_Vertex, init_p.data()); -- cgit v1.2.3