diff options
author | Sebastián Aedo <saedo@codeweavers.com> | 2021-11-08 21:18:13 +0300 |
---|---|---|
committer | Sebastián Aedo <saedo@codeweavers.com> | 2021-11-08 21:21:19 +0300 |
commit | 48046646eea04a4060862a1f8a0f85b88fd54339 (patch) | |
tree | 3991903c4825e4503afa9f937a674b2e5fd0b550 /spirv_cross.cpp | |
parent | 250a02967dda824d383313c2c88212b94c404849 (diff) |
Fixed wrong condition and formatting.
Signed-off-by: Sebastián Aedo <saedo@codeweavers.com>
Diffstat (limited to 'spirv_cross.cpp')
-rw-r--r-- | spirv_cross.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spirv_cross.cpp b/spirv_cross.cpp index 2c2dacee..6e18e665 100644 --- a/spirv_cross.cpp +++ b/spirv_cross.cpp @@ -1626,9 +1626,11 @@ SPIRBlock::ContinueBlockType Compiler::continue_block_type(const SPIRBlock &bloc } } -void Compiler::fix_switch_branches(const SPIRBlock &block) const { +void Compiler::fix_switch_branches(const SPIRBlock &block) const +{ auto search = ir.load_type_width.find(block.condition); - if (search == ir.load_type_width.end()) { + if (search == ir.load_type_width.end()) + { SPIRV_CROSS_THROW("Use of undeclared variable on a switch statement."); } |