From b118451e301d734e3e783b3acdf871f3f6ea851c Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Wed, 6 Nov 2024 01:47:26 +0800 Subject: Move switch statement bodies to their own lines (#5493) * Move switch statement bodies to their own lines * format --------- Co-authored-by: Yong He --- tools/gfx/d3d12/d3d12-command-encoder.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'tools/gfx/d3d12/d3d12-command-encoder.cpp') diff --git a/tools/gfx/d3d12/d3d12-command-encoder.cpp b/tools/gfx/d3d12/d3d12-command-encoder.cpp index f0b4b0dfc..bed31f2f5 100644 --- a/tools/gfx/d3d12/d3d12-command-encoder.cpp +++ b/tools/gfx/d3d12/d3d12-command-encoder.cpp @@ -24,10 +24,15 @@ int PipelineCommandEncoder::getBindPointIndex(PipelineType type) { switch (type) { - case PipelineType::Graphics: return 0; - case PipelineType::Compute: return 1; - case PipelineType::RayTracing: return 2; - default: assert(!"unknown pipeline type."); return -1; + case PipelineType::Graphics: + return 0; + case PipelineType::Compute: + return 1; + case PipelineType::RayTracing: + return 2; + default: + assert(!"unknown pipeline type."); + return -1; } } @@ -124,7 +129,9 @@ Result PipelineCommandEncoder::_bindRenderState( d3dheap = m_transientHeap->getCurrentSamplerHeap().getHeap(); m_commandBuffer->bindDescriptorHeaps(); break; - default: assert(!"shouldn't be here"); return SLANG_FAIL; + default: + assert(!"shouldn't be here"); + return SLANG_FAIL; } // Try again. @@ -456,7 +463,8 @@ void ResourceCommandEncoderImpl::clearResourceView( } break; } - default: break; + default: + break; } } -- cgit v1.2.3