Run clang-format

Fix some small style inconsistencies
This commit is contained in:
ISSOtm
2024-03-28 01:41:25 +01:00
parent d327138cd8
commit 20b7b591d4
9 changed files with 18 additions and 18 deletions

View File

@@ -2175,7 +2175,8 @@ static Capture startCapture() {
view && lexerState->expansions.empty()) { view && lexerState->expansions.empty()) {
return { return {
.lineNo = lineNo, .lineNo = lineNo,
.span = { .span =
{
.ptr = std::shared_ptr<char[]>(view->span.ptr, &view->span.ptr[view->offset]), .ptr = std::shared_ptr<char[]>(view->span.ptr, &view->span.ptr[view->offset]),
.size = 0, .size = 0,
} }

View File

@@ -20,7 +20,7 @@
unsigned int nbErrors = 0; unsigned int nbErrors = 0;
unsigned int maxErrors = 0; unsigned int maxErrors = 0;
static const WarningState defaultWarnings[ARRAY_SIZE(warningStates)] = { static WarningState const defaultWarnings[ARRAY_SIZE(warningStates)] = {
WARNING_ENABLED, // WARNING_ASSERT WARNING_ENABLED, // WARNING_ASSERT
WARNING_DISABLED, // WARNING_BACKWARDS_FOR WARNING_DISABLED, // WARNING_BACKWARDS_FOR
WARNING_DISABLED, // WARNING_BUILTIN_ARG WARNING_DISABLED, // WARNING_BUILTIN_ARG

View File

@@ -4,7 +4,7 @@
#include "extern/utf8decoder.hpp" #include "extern/utf8decoder.hpp"
static const uint8_t utf8d[] = { static uint8_t const utf8d[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00..0f */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00..0f */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10..1f */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10..1f */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 20..2f */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 20..2f */

View File

@@ -729,13 +729,13 @@ static bool hasRAM(MbcType type) {
unreachable_(); unreachable_();
} }
static const uint8_t ninLogo[] = { static uint8_t const ninLogo[] = {
0xCE, 0xED, 0x66, 0x66, 0xCC, 0x0D, 0x00, 0x0B, 0x03, 0x73, 0x00, 0x83, 0x00, 0x0C, 0x00, 0x0D, 0xCE, 0xED, 0x66, 0x66, 0xCC, 0x0D, 0x00, 0x0B, 0x03, 0x73, 0x00, 0x83, 0x00, 0x0C, 0x00, 0x0D,
0x00, 0x08, 0x11, 0x1F, 0x88, 0x89, 0x00, 0x0E, 0xDC, 0xCC, 0x6E, 0xE6, 0xDD, 0xDD, 0xD9, 0x99, 0x00, 0x08, 0x11, 0x1F, 0x88, 0x89, 0x00, 0x0E, 0xDC, 0xCC, 0x6E, 0xE6, 0xDD, 0xDD, 0xD9, 0x99,
0xBB, 0xBB, 0x67, 0x63, 0x6E, 0x0E, 0xEC, 0xCC, 0xDD, 0xDC, 0x99, 0x9F, 0xBB, 0xB9, 0x33, 0x3E, 0xBB, 0xBB, 0x67, 0x63, 0x6E, 0x0E, 0xEC, 0xCC, 0xDD, 0xDC, 0x99, 0x9F, 0xBB, 0xB9, 0x33, 0x3E,
}; };
static const uint8_t trashLogo[] = { static uint8_t const trashLogo[] = {
0xFF ^ 0xCE, 0xFF ^ 0xED, 0xFF ^ 0x66, 0xFF ^ 0x66, 0xFF ^ 0xCC, 0xFF ^ 0x0D, 0xFF ^ 0x00, 0xFF ^ 0xCE, 0xFF ^ 0xED, 0xFF ^ 0x66, 0xFF ^ 0x66, 0xFF ^ 0xCC, 0xFF ^ 0x0D, 0xFF ^ 0x00,
0xFF ^ 0x0B, 0xFF ^ 0x03, 0xFF ^ 0x73, 0xFF ^ 0x00, 0xFF ^ 0x83, 0xFF ^ 0x00, 0xFF ^ 0x0C, 0xFF ^ 0x0B, 0xFF ^ 0x03, 0xFF ^ 0x73, 0xFF ^ 0x00, 0xFF ^ 0x83, 0xFF ^ 0x00, 0xFF ^ 0x0C,
0xFF ^ 0x00, 0xFF ^ 0x0D, 0xFF ^ 0x00, 0xFF ^ 0x08, 0xFF ^ 0x11, 0xFF ^ 0x1F, 0xFF ^ 0x88, 0xFF ^ 0x00, 0xFF ^ 0x0D, 0xFF ^ 0x00, 0xFF ^ 0x08, 0xFF ^ 0x11, 0xFF ^ 0x1F, 0xFF ^ 0x88,

View File

@@ -246,8 +246,8 @@ static void placeSection(Section &section) {
bankMem.insert( bankMem.insert(
bankMem.begin() + spaceIdx + 1, bankMem.begin() + spaceIdx + 1,
{.address = (uint16_t)(section.org + section.size), {.address = (uint16_t)(section.org + section.size),
.size = .size = (uint16_t)(freeSpace.address + freeSpace.size - section.org - section.size)
(uint16_t)(freeSpace.address + freeSpace.size - section.org - section.size)} }
); );
// **`freeSpace` cannot be reused from this point on**, because `bankMem.insert` // **`freeSpace` cannot be reused from this point on**, because `bankMem.insert`
// invalidates all references to itself! // invalidates all references to itself!

View File

@@ -52,7 +52,7 @@ static SectionType typeMap[SECTTYPE_INVALID] = {
}; };
void out_AddSection(Section const &section) { void out_AddSection(Section const &section) {
static const uint32_t maxNbBanks[SECTTYPE_INVALID] = { static uint32_t const maxNbBanks[SECTTYPE_INVALID] = {
1, // SECTTYPE_WRAM0 1, // SECTTYPE_WRAM0
2, // SECTTYPE_VRAM 2, // SECTTYPE_VRAM
UINT32_MAX, // SECTTYPE_ROMX UINT32_MAX, // SECTTYPE_ROMX

View File

@@ -9,9 +9,8 @@
#include <variant> #include <variant>
#include <vector> #include <vector>
#include "opmath.hpp"
#include "linkdefs.hpp" #include "linkdefs.hpp"
#include "opmath.hpp"
#include "link/main.hpp" #include "link/main.hpp"
#include "link/section.hpp" #include "link/section.hpp"