mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-19 20:27:05 +00:00
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:
+1
-1
@@ -532,7 +532,7 @@ static void writeMapSummary() {
|
|||||||
usedTotal == 1 ? "" : "s",
|
usedTotal == 1 ? "" : "s",
|
||||||
static_cast<size_t>(nbBanks) * sectionTypeInfo[type].size - usedTotal
|
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");
|
fprintf(mapFile, " in %u bank%s", nbBanks, nbBanks == 1 ? "" : "s");
|
||||||
}
|
}
|
||||||
putc('\n', mapFile);
|
putc('\n', mapFile);
|
||||||
|
|||||||
Reference in New Issue
Block a user