From d6681d35805516b17fd42a60468d004be45d0e50 Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Wed, 28 Feb 2024 14:32:15 -0500 Subject: [PATCH] `struct Section`'s `src` can be `const` --- include/asm/section.hpp | 2 +- src/asm/fstack.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/asm/section.hpp b/include/asm/section.hpp index 49f90d72..4a31ebb7 100644 --- a/include/asm/section.hpp +++ b/include/asm/section.hpp @@ -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; diff --git a/src/asm/fstack.cpp b/src/asm/fstack.cpp index f05bfde7..8c1943b3 100644 --- a/src/asm/fstack.cpp +++ b/src/asm/fstack.cpp @@ -382,7 +382,7 @@ void fstk_RunMacro(char const *macroName, struct MacroArgs *args) } } if (macro->src->type == NODE_REPT) { - std::vector &srcIters = macro->src->iters(); + std::vector const &srcIters = macro->src->iters(); for (uint32_t i = srcIters.size(); i--; ) { char buf[sizeof("::REPT~4294967295")]; // UINT32_MAX