mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
No more flexible array members (not standard C++) (#1307)
* Replace FAMs with `std::vector`s (or one `std::string`) in four `struct`s * Anonymous types declared in an anonymous union are also non-standard Only Clang complains about this (-Wnested-anon-types)
This commit is contained in:
@@ -457,14 +457,14 @@ static void writeFileStackNode(struct FileStackNode const *node, FILE *f)
|
||||
putlong(node->lineNo, f);
|
||||
putc(node->type, f);
|
||||
if (node->type != NODE_REPT) {
|
||||
putstring(((struct FileStackNamedNode const *)node)->name, f);
|
||||
putstring(((struct FileStackNamedNode const *)node)->name->c_str(), f);
|
||||
} else {
|
||||
struct FileStackReptNode const *reptNode = (struct FileStackReptNode const *)node;
|
||||
|
||||
putlong(reptNode->reptDepth, f);
|
||||
putlong(reptNode->iters->size(), f);
|
||||
// Iters are stored by decreasing depth, so reverse the order for output
|
||||
for (uint32_t i = reptNode->reptDepth; i--; )
|
||||
putlong(reptNode->iters[i], f);
|
||||
for (uint32_t i = reptNode->iters->size(); i--; )
|
||||
putlong((*reptNode->iters)[i], f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user