Add some more trailing commas

This commit is contained in:
Rangi42
2024-03-04 22:53:11 -05:00
parent e74073e480
commit 74539f08ba
4 changed files with 22 additions and 15 deletions

View File

@@ -579,12 +579,12 @@ static void parseGBCFile(std::filebuf &file) {
break;
}
options.palSpec.push_back(
{Rgba::fromCGBColor(readLE<uint16_t>(&buf[0])),
options.palSpec.push_back({
Rgba::fromCGBColor(readLE<uint16_t>(&buf[0])),
Rgba::fromCGBColor(readLE<uint16_t>(&buf[2])),
Rgba::fromCGBColor(readLE<uint16_t>(&buf[4])),
Rgba::fromCGBColor(readLE<uint16_t>(&buf[6]))}
);
Rgba::fromCGBColor(readLE<uint16_t>(&buf[6])),
});
}
}

View File

@@ -41,9 +41,10 @@ static void initFreeSpace() {
for (enum SectionType type : EnumSeq(SECTTYPE_INVALID)) {
memory[type].resize(nbbanks(type));
for (std::deque<FreeSpace> &bankMem : memory[type]) {
bankMem.push_back(
{.address = sectionTypeInfo[type].startAddr, .size = sectionTypeInfo[type].size}
);
bankMem.push_back({
.address = sectionTypeInfo[type].startAddr,
.size = sectionTypeInfo[type].size,
});
}
}
}

View File

@@ -498,12 +498,16 @@ void obj_ReadFile(char const *fileName, unsigned int fileID) {
case 'R':
break;
default: // This is (probably) a SDCC object file, defer the rest of detection to it
default:
// This is (probably) a SDCC object file, defer the rest of detection to it.
// Since SDCC does not provide line info, everything will be reported as coming from the
// object file. It's better than nothing.
nodes[fileID].push_back(
{.parent = nullptr, .lineNo = 0, .type = NODE_FILE, .data = fileName}
);
nodes[fileID].push_back({
.parent = nullptr,
.lineNo = 0,
.type = NODE_FILE,
.data = fileName,
});
std::vector<Symbol> &fileSymbols = symbolLists.emplace_front();

View File

@@ -345,8 +345,10 @@ static void writeSymBank(SortedSections const &bankSections, enum SectionType ty
for (Symbol const *sym : sect->symbols) {
// Don't output symbols that begin with an illegal character
if (!sym->name.empty() && canStartSymName(sym->name[0]))
symList.push_back({.sym = sym, .addr = (uint16_t)(sym->label().offset + sect->org)}
);
symList.push_back({
.sym = sym,
.addr = (uint16_t)(sym->label().offset + sect->org),
});
}
});