From 74539f08ba90590cb2b88a68cfb01b53f6f0fff5 Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Mon, 4 Mar 2024 22:53:11 -0500 Subject: [PATCH] Add some more trailing commas --- src/gfx/pal_spec.cpp | 12 ++++++------ src/link/assign.cpp | 7 ++++--- src/link/object.cpp | 12 ++++++++---- src/link/output.cpp | 6 ++++-- 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/gfx/pal_spec.cpp b/src/gfx/pal_spec.cpp index e52c3d1d..7ba764ba 100644 --- a/src/gfx/pal_spec.cpp +++ b/src/gfx/pal_spec.cpp @@ -579,12 +579,12 @@ static void parseGBCFile(std::filebuf &file) { break; } - options.palSpec.push_back( - {Rgba::fromCGBColor(readLE(&buf[0])), - Rgba::fromCGBColor(readLE(&buf[2])), - Rgba::fromCGBColor(readLE(&buf[4])), - Rgba::fromCGBColor(readLE(&buf[6]))} - ); + options.palSpec.push_back({ + Rgba::fromCGBColor(readLE(&buf[0])), + Rgba::fromCGBColor(readLE(&buf[2])), + Rgba::fromCGBColor(readLE(&buf[4])), + Rgba::fromCGBColor(readLE(&buf[6])), + }); } } diff --git a/src/link/assign.cpp b/src/link/assign.cpp index bbd7d230..620ab0c5 100644 --- a/src/link/assign.cpp +++ b/src/link/assign.cpp @@ -41,9 +41,10 @@ static void initFreeSpace() { for (enum SectionType type : EnumSeq(SECTTYPE_INVALID)) { memory[type].resize(nbbanks(type)); for (std::deque &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, + }); } } } diff --git a/src/link/object.cpp b/src/link/object.cpp index 20bd7dc6..136ff90d 100644 --- a/src/link/object.cpp +++ b/src/link/object.cpp @@ -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 &fileSymbols = symbolLists.emplace_front(); diff --git a/src/link/output.cpp b/src/link/output.cpp index bf743a54..25ffeb86 100644 --- a/src/link/output.cpp +++ b/src/link/output.cpp @@ -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), + }); } });