mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
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:
@@ -48,7 +48,7 @@ struct Section {
|
||||
// Extra info computed during linking
|
||||
std::vector<Symbol> *fileSymbols;
|
||||
std::vector<Symbol *> symbols;
|
||||
std::unique_ptr<Section> nextu; // The next "component" of this unionized sect
|
||||
std::unique_ptr<Section> nextPiece; // The next fragment or union "piece" of this section
|
||||
};
|
||||
|
||||
// Execute a callback for each section currently registered.
|
||||
|
||||
@@ -33,8 +33,8 @@ struct Symbol {
|
||||
>
|
||||
data;
|
||||
|
||||
Label &label() { return std::get<Label>(data); }
|
||||
Label const &label() const { return std::get<Label>(data); }
|
||||
void linkToSection(Section §ion);
|
||||
void fixSectionOffset();
|
||||
};
|
||||
|
||||
void sym_ForEach(void (*callback)(Symbol &));
|
||||
|
||||
Reference in New Issue
Block a user