mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Use C++ iterator for fragment/union "pieces" of RGBLINK sections
This commit is contained in:
@@ -53,9 +53,9 @@ static void initFreeSpace() {
|
||||
static void assignSection(Section §ion, MemoryLocation const &location) {
|
||||
// Propagate the assigned location to all UNIONs/FRAGMENTs
|
||||
// so `jr` patches in them will have the correct offset
|
||||
for (Section *piece = §ion; piece != nullptr; piece = piece->nextPiece.get()) {
|
||||
piece->org = location.address;
|
||||
piece->bank = location.bank;
|
||||
for (Section &piece : section.pieces()) {
|
||||
piece.org = location.address;
|
||||
piece.bank = location.bank;
|
||||
}
|
||||
out_AddSection(section);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user