Replace some #define with constexpr

This commit is contained in:
Rangi42
2025-01-03 21:35:17 -05:00
committed by Rangi
parent a5f12f66bb
commit 4e2464a69d
8 changed files with 38 additions and 40 deletions

View File

@@ -201,7 +201,8 @@ void sdobj_ReadFile(FileStackNode const &where, FILE *file, std::vector<Symbol>
fatal(&where, lineNo, "Unknown endianness type '%c'", line[0]);
}
#define ADDR_SIZE 3
static constexpr uint8_t ADDR_SIZE = 3;
if (line[1] != '0' + ADDR_SIZE)
fatal(&where, lineNo, "Unknown or unsupported address size '%c'", line[1]);