Use C++ iterator for fragment/union "pieces" of RGBLINK sections

This commit is contained in:
Rangi
2025-10-05 15:06:17 -04:00
parent 7733ccdeb6
commit 0c9920d4a6
6 changed files with 56 additions and 24 deletions

View File

@@ -223,12 +223,10 @@ void out_WriteObject() {
putLong(fileStackNodes.size(), file);
for (auto it = fileStackNodes.begin(); it != fileStackNodes.end(); ++it) {
FileStackNode const &node = **it;
writeFileStackNode(node, file);
writeFileStackNode(**it, file);
// The list is supposed to have decrementing IDs
assume(it + 1 == fileStackNodes.end() || it[1]->ID == node.ID - 1);
assume(it + 1 == fileStackNodes.end() || it[1]->ID == it[0]->ID - 1);
}
for (Symbol const *sym : objectSymbols) {