mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Prefer pre-inc/dec unless post-inc/dec are necessary
This commit is contained in:
@@ -90,7 +90,7 @@ void out_AddSection(Section const §ion) {
|
||||
// Insert section while keeping the list sorted by increasing org
|
||||
auto pos = bankSections.begin();
|
||||
while (pos != bankSections.end() && (*pos)->org < section.org) {
|
||||
pos++;
|
||||
++pos;
|
||||
}
|
||||
bankSections.insert(pos, §ion);
|
||||
}
|
||||
@@ -178,7 +178,7 @@ static void
|
||||
// Output padding up to the next SECTION
|
||||
while (offset + baseOffset < section->org) {
|
||||
putc(getNextFillByte(), outputFile);
|
||||
offset++;
|
||||
++offset;
|
||||
}
|
||||
|
||||
// Output the section itself
|
||||
@@ -196,7 +196,7 @@ static void
|
||||
if (!disablePadding) {
|
||||
while (offset < size) {
|
||||
putc(getNextFillByte(), outputFile);
|
||||
offset++;
|
||||
++offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -419,7 +419,7 @@ uint16_t forEachSection(SortedSections const §List, F callback) {
|
||||
: zeroLenSection;
|
||||
used += (*pickedSection)->size;
|
||||
callback(**pickedSection);
|
||||
pickedSection++;
|
||||
++pickedSection;
|
||||
}
|
||||
return used;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user