struct Section's src can be const

This commit is contained in:
Rangi42
2024-02-28 14:32:15 -05:00
committed by Sylvie
parent 0cc49782ab
commit d6681d3580
2 changed files with 2 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ struct Section {
char *name;
enum SectionType type;
enum SectionModifier modifier;
struct FileStackNode *src; // Where the section was defined
struct FileStackNode const *src; // Where the section was defined
uint32_t fileLine; // Line where the section was defined
uint32_t size;
uint32_t org;

View File

@@ -382,7 +382,7 @@ void fstk_RunMacro(char const *macroName, struct MacroArgs *args)
}
}
if (macro->src->type == NODE_REPT) {
std::vector<uint32_t> &srcIters = macro->src->iters();
std::vector<uint32_t> const &srcIters = macro->src->iters();
for (uint32_t i = srcIters.size(); i--; ) {
char buf[sizeof("::REPT~4294967295")]; // UINT32_MAX