Use concrete types instead of auto when convenient and not redundant (#1757)

This commit is contained in:
Rangi
2025-07-17 14:59:51 -04:00
committed by GitHub
parent 9dddd87893
commit 0c96234532
16 changed files with 67 additions and 68 deletions

View File

@@ -86,12 +86,12 @@ void out_AddSection(Section const &section) {
std::deque<Section const *> &bankSections =
section.size ? sections[section.type][targetBank].sections
: sections[section.type][targetBank].zeroLenSections;
auto pos = bankSections.begin();
// Insert section while keeping the list sorted by increasing org
auto pos = bankSections.begin();
while (pos != bankSections.end() && (*pos)->org < section.org) {
pos++;
}
bankSections.insert(pos, &section);
}
@@ -347,7 +347,7 @@ static void writeSymBank(SortedSections const &bankSections, SectionType type, u
std::string parentName = sym->name.substr(0, pos);
if (Symbol const *parentSym = sym_GetSymbol(parentName);
parentSym && std::holds_alternative<Label>(parentSym->data)) {
auto const &parentLabel = parentSym->label();
Label const &parentLabel = parentSym->label();
Section const &parentSection = *parentLabel.section;
parentAddr = static_cast<uint16_t>(parentLabel.offset + parentSection.org);
}