mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Refactor for better formatting
This commit is contained in:
@@ -241,11 +241,8 @@ static void placeSection(Section §ion) {
|
|||||||
} else if (!noLeftSpace && !noRightSpace) {
|
} else if (!noLeftSpace && !noRightSpace) {
|
||||||
// The free space is split in two
|
// The free space is split in two
|
||||||
// Append the new space after the original one
|
// Append the new space after the original one
|
||||||
bankMem.insert(
|
uint16_t size = static_cast<uint16_t>(freeSpace.address + freeSpace.size - sectionEnd);
|
||||||
bankMem.begin() + spaceIdx + 1,
|
bankMem.insert(bankMem.begin() + spaceIdx + 1, {.address = sectionEnd, .size = size});
|
||||||
{.address = sectionEnd,
|
|
||||||
.size = static_cast<uint16_t>(freeSpace.address + freeSpace.size - sectionEnd)}
|
|
||||||
);
|
|
||||||
// **`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