From 990ee63a6e9779c92cea6dc72322d6da168c6190 Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 25 Sep 2020 12:55:12 -0700 Subject: [PATCH] Fix brace style in Graphics::Makebfont() and Graphics::bfontlen() Seriously, Leo, why did you have to use braces like this... --- desktop_version/src/Graphics.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 4eac7278..585c4847 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -257,25 +257,33 @@ void Graphics::Makebfont() unsigned char* charmap = NULL; size_t length; FILESYSTEM_loadFileToMemory("graphics/font.txt", &charmap, &length); - if (charmap != NULL) { + if (charmap != NULL) + { unsigned char* current = charmap; unsigned char* end = charmap + length; int pos = 0; - while (current != end) { + while (current != end) + { int codepoint = utf8::unchecked::next(current); font_positions[codepoint] = pos; ++pos; } FILESYSTEM_freeMemory(&charmap); - } else { + } + else + { font_positions.clear(); } } -int Graphics::bfontlen(uint32_t ch) { - if (ch < 32) { +int Graphics::bfontlen(uint32_t ch) +{ + if (ch < 32) + { return 6; - } else { + } + else + { return 8; } }