summaryrefslogtreecommitdiffstats
path: root/tools/slang-embed
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-11-06 01:47:26 +0800
committerGitHub <noreply@github.com>2024-11-05 09:47:26 -0800
commitb118451e301d734e3e783b3acdf871f3f6ea851c (patch)
tree277f160d31e2c442f724bc6a2d3c09fabff403ca /tools/slang-embed
parent53dd5928c35d5a5cb1f7d2a563348fd1fa87d672 (diff)
Move switch statement bodies to their own lines (#5493)
* Move switch statement bodies to their own lines * format --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tools/slang-embed')
-rw-r--r--tools/slang-embed/slang-embed.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/tools/slang-embed/slang-embed.cpp b/tools/slang-embed/slang-embed.cpp
index 5910e00f8..eb493be4b 100644
--- a/tools/slang-embed/slang-embed.cpp
+++ b/tools/slang-embed/slang-embed.cpp
@@ -167,10 +167,18 @@ struct App
{
// The common C escape sequencs are handled directly.
//
- case '"': fprintf(outputFile, "\\\""); break;
- case '\n': fprintf(outputFile, "\\n"); break;
- case '\t': fprintf(outputFile, "\\t"); break;
- case '\\': fprintf(outputFile, "\\\\"); break;
+ case '"':
+ fprintf(outputFile, "\\\"");
+ break;
+ case '\n':
+ fprintf(outputFile, "\\n");
+ break;
+ case '\t':
+ fprintf(outputFile, "\\t");
+ break;
+ case '\\':
+ fprintf(outputFile, "\\\\");
+ break;
default:
// For all other cases, we detect if the byte
// is in the printable ASCII range, and emit
@@ -252,8 +260,10 @@ struct App
{
switch (*cursor)
{
- default: break;
- case '-': *cursor = '_';
+ default:
+ break;
+ case '-':
+ *cursor = '_';
}
}