Remove now-unnecessary enum keyword (#1338)

C++ does not need it
This commit is contained in:
Sylvie
2024-03-08 19:40:41 -05:00
committed by GitHub
parent 1b97297d63
commit 53537cf9af
27 changed files with 95 additions and 127 deletions

View File

@@ -41,7 +41,7 @@ struct SortedSections {
static std::deque<SortedSections> sections[SECTTYPE_INVALID];
// Defines the order in which types are output to the sym and map files
static enum SectionType typeMap[SECTTYPE_INVALID] = {
static SectionType typeMap[SECTTYPE_INVALID] = {
SECTTYPE_ROM0,
SECTTYPE_ROMX,
SECTTYPE_VRAM,
@@ -315,7 +315,7 @@ static int compareSymbols(SortedSymbol const &sym1, SortedSymbol const &sym2) {
* Write a bank's contents to the sym file
* @param bankSections The bank's sections
*/
static void writeSymBank(SortedSections const &bankSections, enum SectionType type, uint32_t bank) {
static void writeSymBank(SortedSections const &bankSections, SectionType type, uint32_t bank) {
#define forEachSortedSection(sect, ...) \
do { \
for (auto it = bankSections.zeroLenSections.begin(); \
@@ -383,7 +383,7 @@ static void writeEmptySpace(uint16_t begin, uint16_t end) {
/*
* Write a bank's contents to the map file
*/
static void writeMapBank(SortedSections const &sectList, enum SectionType type, uint32_t bank) {
static void writeMapBank(SortedSections const &sectList, SectionType type, uint32_t bank) {
fprintf(
mapFile,
"\n%s bank #%" PRIu32 ":\n",
@@ -474,7 +474,7 @@ static void writeMapSummary() {
fputs("SUMMARY:\n", mapFile);
for (uint8_t i = 0; i < SECTTYPE_INVALID; i++) {
enum SectionType type = typeMap[i];
SectionType type = typeMap[i];
uint32_t nbBanks = sections[type].size();
// Do not output used space for VRAM or OAM
@@ -539,7 +539,7 @@ static void writeSym() {
fputs("; File generated by rgblink\n", symFile);
for (uint8_t i = 0; i < SECTTYPE_INVALID; i++) {
enum SectionType type = typeMap[i];
SectionType type = typeMap[i];
for (uint32_t bank = 0; bank < sections[type].size(); bank++)
writeSymBank(sections[type][bank], type, bank);
@@ -565,7 +565,7 @@ static void writeMap() {
writeMapSummary();
for (uint8_t i = 0; i < SECTTYPE_INVALID; i++) {
enum SectionType type = typeMap[i];
SectionType type = typeMap[i];
for (uint32_t bank = 0; bank < sections[type].size(); bank++)
writeMapBank(sections[type][bank], type, bank);