Avoid using std::get except in holds_alternative-asserting accessors

This commit is contained in:
Rangi42
2024-03-03 23:33:23 -05:00
parent 13904dc536
commit f2c875e71e
6 changed files with 23 additions and 8 deletions

View File

@@ -347,7 +347,7 @@ static void writeSymBank(SortedSections const &bankSections, enum SectionType ty
if (!sym->name.empty() && canStartSymName(sym->name[0]))
symList.push_back({
.sym = sym,
.addr = (uint16_t)(std::get<Label>(sym->data).offset + sect->org)
.addr = (uint16_t)(sym->label().offset + sect->org)
});
}
});
@@ -417,7 +417,7 @@ static void writeMapBank(SortedSections const &sectList, enum SectionType type,
for (Symbol *sym : sect->symbols)
// Space matches "\tSECTION: $xxxx ..."
fprintf(mapFile, "\t $%04" PRIx32 " = %s\n",
std::get<Label>(sym->data).offset + org,
sym->label().offset + org,
sym->name.c_str());
if (sect->nextu) {