mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Run clang-format 14 on everything
Later versions may need some proprties added or changed to not format closing braces weirdly.
This commit is contained in:
@@ -2175,19 +2175,18 @@ 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,
|
}
|
||||||
}
|
};
|
||||||
};
|
|
||||||
} else {
|
} else {
|
||||||
assert(lexerState->captureBuf == nullptr);
|
assert(lexerState->captureBuf == nullptr);
|
||||||
lexerState->captureBuf = std::make_shared<std::vector<char>>();
|
lexerState->captureBuf = std::make_shared<std::vector<char>>();
|
||||||
// `.span.ptr == nullptr`; indicates to retrieve the capture buffer when done capturing
|
// `.span.ptr == nullptr`; indicates to retrieve the capture buffer when done capturing
|
||||||
return {
|
return {
|
||||||
.lineNo = lineNo, .span = {.ptr = nullptr, .size = 0}
|
.lineNo = lineNo, .span = {.ptr = nullptr, .size = 0}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ void reverse() {
|
|||||||
|
|
||||||
std::vector<std::array<std::optional<Rgba>, 4>> palettes{
|
std::vector<std::array<std::optional<Rgba>, 4>> palettes{
|
||||||
{Rgba(0xFFFFFFFF), Rgba(0xAAAAAAFF), Rgba(0x555555FF), Rgba(0x000000FF)}
|
{Rgba(0xFFFFFFFF), Rgba(0xAAAAAAFF), Rgba(0x555555FF), Rgba(0x000000FF)}
|
||||||
};
|
};
|
||||||
// If a palette file is used as input, it overrides the default colors.
|
// If a palette file is used as input, it overrides the default colors.
|
||||||
if (!options.palettes.empty()) {
|
if (!options.palettes.empty()) {
|
||||||
File file;
|
File file;
|
||||||
|
|||||||
@@ -246,8 +246,8 @@ static void placeSection(Section §ion) {
|
|||||||
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 = (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`
|
// **`freeSpace` cannot be reused from this point on**, because `bankMem.insert`
|
||||||
// invalidates all references to itself!
|
// invalidates all references to itself!
|
||||||
|
|||||||
Reference in New Issue
Block a user