Use std::unique_ptr for rgblink sections (#1337)

This commit is contained in:
Sylvie
2024-03-09 11:12:01 -05:00
committed by GitHub
parent 9890cf25b4
commit 4a7d333891
9 changed files with 102 additions and 114 deletions

View File

@@ -321,11 +321,11 @@ static void writeSymBank(SortedSections const &bankSections, SectionType type, u
for (auto it = bankSections.zeroLenSections.begin(); \
it != bankSections.zeroLenSections.end(); \
it++) { \
for (Section const *sect = *it; sect; sect = sect->nextu) \
for (Section const *sect = *it; sect; sect = sect->nextu.get()) \
__VA_ARGS__ \
} \
for (auto it = bankSections.sections.begin(); it != bankSections.sections.end(); it++) { \
for (Section const *sect = *it; sect; sect = sect->nextu) \
for (Section const *sect = *it; sect; sect = sect->nextu.get()) \
__VA_ARGS__ \
} \
} while (0)
@@ -431,7 +431,7 @@ static void writeMapBank(SortedSections const &sectList, SectionType type, uint3
if (!noSymInMap) {
// Also print symbols in the following "pieces"
for (uint16_t org = sect->org; sect; sect = sect->nextu) {
for (uint16_t org = sect->org; sect; sect = sect->nextu.get()) {
for (Symbol *sym : sect->symbols)
// Space matches "\tSECTION: $xxxx ..."
fprintf(