Prefer C++ constructs to C-style sizeof-based macros

This commit is contained in:
Rangi42
2025-01-24 18:44:43 -05:00
parent 84f59e14ed
commit 890528812e
7 changed files with 25 additions and 26 deletions

View File

@@ -623,7 +623,7 @@ static std::tuple<DefaultInitVec<size_t>, std::vector<Palette>>
for (uint16_t cgbColor : list) {
ptr += snprintf(ptr, sizeof(", $XXXX"), ", $%04x", cgbColor);
}
return &buf[QUOTEDSTRLEN(", ")];
return &buf[literal_strlen(", ")];
};
// Iterate through proto-palettes, and try mapping them to the specified palettes