Remove redundant conditional check (#2099)

If `nbBanks > 1` is true, then `sectionTypeInfo[type].firstBank !=
sectionTypeInfo[type].lastBank` must also be true, so checking
whether either is true is unnecessary.

(On the other hand, if `nbBanks == 1`, then we might still have
`sectionTypeInfo[type].firstBank != sectionTypeInfo[type].lastBank`,
since only one of many valid banks for `type` could be in use.)
This commit is contained in:
Rangi
2026-09-17 00:27:22 +02:00
committed by GitHub
parent 6587941512
commit 589616338f
+1 -1
View File
@@ -532,7 +532,7 @@ static void writeMapSummary() {
usedTotal == 1 ? "" : "s",
static_cast<size_t>(nbBanks) * sectionTypeInfo[type].size - usedTotal
);
if (sectionTypeInfo[type].firstBank != sectionTypeInfo[type].lastBank || nbBanks > 1) {
if (sectionTypeInfo[type].firstBank != sectionTypeInfo[type].lastBank) {
fprintf(mapFile, " in %u bank%s", nbBanks, nbBanks == 1 ? "" : "s");
}
putc('\n', mapFile);