From 6cff5a41b4804dfd9a4c8d6bef05c26aa25f4c27 Mon Sep 17 00:00:00 2001 From: Christoph Baumann Date: Thu, 22 May 2025 12:23:27 +0200 Subject: [PATCH] indentation --- fusee/program/source/fusee_util.cpp | 57 ++++++++++++++--------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/fusee/program/source/fusee_util.cpp b/fusee/program/source/fusee_util.cpp index 2b5d8fec2..6f7b34726 100644 --- a/fusee/program/source/fusee_util.cpp +++ b/fusee/program/source/fusee_util.cpp @@ -18,45 +18,44 @@ namespace ams::nxboot { u32 ParseHexInteger(const char *s) { - u32 x = 0; - if (s[0] == '0' && s[1] == 'x') { - s += 2; - } + u32 x = 0; + if (s[0] == '0' && s[1] == 'x') { + s += 2; + } - while (true) { - const char c = *(s++); + while (true) { + const char c = *(s++); - if (c == '\x00') { - return x; - } else { - x <<= 4; + if (c == '\x00') { + return x; + } else { + x <<= 4; - if ('0' <= c && c <= '9') { - x |= (c - '0'); - } else if ('a' <= c && c <= 'f') { - x |= (c - 'a') + 10; - } else if ('A' <= c && c <= 'F') { - x |= (c - 'A') + 10; - } + if ('0' <= c && c <= '9') { + x |= (c - '0'); + } else if ('a' <= c && c <= 'f') { + x |= (c - 'a') + 10; + } else if ('A' <= c && c <= 'F') { + x |= (c - 'A') + 10; } } } + } - u32 ParseDecimalInteger(const char *s) { - u32 x = 0; - while (true) { - const char c = *(s++); + u32 ParseDecimalInteger(const char *s) { + u32 x = 0; + while (true) { + const char c = *(s++); - if (c == '\x00') { - return x; - } else { - x *= 10; + if (c == '\x00') { + return x; + } else { + x *= 10; - if ('0' <= c && c <= '9') { - x += c - '0'; - } + if ('0' <= c && c <= '9') { + x += c - '0'; } } } - + } }