mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Run clang-format
Fix some small style inconsistencies
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
|
||||
// Neither MSVC nor MinGW provide `mmap`
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
// clang-format off
|
||||
// clang-format off
|
||||
// (we need these `include`s in this order)
|
||||
#define WIN32_LEAN_AND_MEAN // include less from windows.h
|
||||
#include <windows.h> // target architecture
|
||||
@@ -2175,7 +2175,8 @@ static Capture startCapture() {
|
||||
view && lexerState->expansions.empty()) {
|
||||
return {
|
||||
.lineNo = lineNo,
|
||||
.span = {
|
||||
.span =
|
||||
{
|
||||
.ptr = std::shared_ptr<char[]>(view->span.ptr, &view->span.ptr[view->offset]),
|
||||
.size = 0,
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
unsigned int nbErrors = 0;
|
||||
unsigned int maxErrors = 0;
|
||||
|
||||
static const WarningState defaultWarnings[ARRAY_SIZE(warningStates)] = {
|
||||
static WarningState const defaultWarnings[ARRAY_SIZE(warningStates)] = {
|
||||
WARNING_ENABLED, // WARNING_ASSERT
|
||||
WARNING_DISABLED, // WARNING_BACKWARDS_FOR
|
||||
WARNING_DISABLED, // WARNING_BUILTIN_ARG
|
||||
|
||||
2
src/extern/utf8decoder.cpp
vendored
2
src/extern/utf8decoder.cpp
vendored
@@ -4,7 +4,7 @@
|
||||
|
||||
#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, /* 10..1f */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 20..2f */
|
||||
|
||||
@@ -729,13 +729,13 @@ static bool hasRAM(MbcType type) {
|
||||
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,
|
||||
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,
|
||||
};
|
||||
|
||||
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 ^ 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,
|
||||
|
||||
@@ -246,8 +246,8 @@ static void placeSection(Section §ion) {
|
||||
bankMem.insert(
|
||||
bankMem.begin() + spaceIdx + 1,
|
||||
{.address = (uint16_t)(section.org + section.size),
|
||||
.size =
|
||||
(uint16_t)(freeSpace.address + freeSpace.size - section.org - section.size)}
|
||||
.size = (uint16_t)(freeSpace.address + freeSpace.size - section.org - section.size)
|
||||
}
|
||||
);
|
||||
// **`freeSpace` cannot be reused from this point on**, because `bankMem.insert`
|
||||
// invalidates all references to itself!
|
||||
|
||||
@@ -52,7 +52,7 @@ static SectionType typeMap[SECTTYPE_INVALID] = {
|
||||
};
|
||||
|
||||
void out_AddSection(Section const §ion) {
|
||||
static const uint32_t maxNbBanks[SECTTYPE_INVALID] = {
|
||||
static uint32_t const maxNbBanks[SECTTYPE_INVALID] = {
|
||||
1, // SECTTYPE_WRAM0
|
||||
2, // SECTTYPE_VRAM
|
||||
UINT32_MAX, // SECTTYPE_ROMX
|
||||
|
||||
@@ -9,9 +9,8 @@
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
#include "opmath.hpp"
|
||||
|
||||
#include "linkdefs.hpp"
|
||||
#include "opmath.hpp"
|
||||
|
||||
#include "link/main.hpp"
|
||||
#include "link/section.hpp"
|
||||
|
||||
Reference in New Issue
Block a user