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/slang-embed/slang-embed.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'tools/slang-embed/slang-embed.cpp') 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 = '_'; } } -- cgit v1.2.3