mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Use FileStackNode constructor to avoid std::monostate possibility
This commit is contained in:
@@ -38,10 +38,6 @@ extern bool disablePadding;
|
||||
} while (0)
|
||||
|
||||
struct FileStackNode {
|
||||
FileStackNode *parent;
|
||||
// Line at which the parent context was exited; meaningless for the root level
|
||||
uint32_t lineNo;
|
||||
|
||||
enum FileStackNodeType type;
|
||||
std::variant<
|
||||
std::monostate, // Default constructed; `.type` and `.data` must be set manually
|
||||
@@ -50,6 +46,10 @@ struct FileStackNode {
|
||||
>
|
||||
data;
|
||||
|
||||
FileStackNode *parent;
|
||||
// Line at which the parent context was exited; meaningless for the root level
|
||||
uint32_t lineNo;
|
||||
|
||||
// REPT iteration counts since last named node, in reverse depth order
|
||||
std::vector<uint32_t> &iters();
|
||||
std::vector<uint32_t> const &iters() const;
|
||||
|
||||
Reference in New Issue
Block a user