Some RGBLINK refactoring

- Consistently refer to `Section` fragments/unions as "pieces" (renaming `.nextu`)
- Remove `Symbol`'s `.label()` accessors (use `std::get<Label>`)
- Move some `Label`-related logic into `Symbol` methods
This commit is contained in:
Rangi42
2025-09-05 16:34:51 -04:00
parent e569e0c200
commit 1fc9ba86c4
10 changed files with 82 additions and 91 deletions
+3 -4
View File
@@ -248,10 +248,9 @@ void layout_PlaceSection(std::string const &name, bool isOptional) {
typeInfo.name.c_str()
);
} else {
// SDCC areas don't have a type assigned yet, so the linker script is used to give them
// one.
for (Section *fragment = section; fragment; fragment = fragment->nextu.get()) {
fragment->type = activeType;
// SDCC areas don't have a type assigned yet, so the linker script gives them one.
for (Section *piece = section; piece != nullptr; piece = piece->nextPiece.get()) {
piece->type = activeType;
}
}
} else if (section->type != activeType) {