mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Prefer pre-inc/dec unless post-inc/dec are necessary
This commit is contained in:
@@ -545,7 +545,7 @@ Symbol *sym_AddAnonLabel() {
|
||||
}
|
||||
|
||||
std::string anon = sym_MakeAnonLabelName(0, true); // The direction is important!
|
||||
anonLabelID++;
|
||||
++anonLabelID;
|
||||
return addLabel(anon);
|
||||
}
|
||||
|
||||
@@ -565,8 +565,8 @@ std::string sym_MakeAnonLabelName(uint32_t ofs, bool neg) {
|
||||
id = anonLabelID - ofs;
|
||||
}
|
||||
} else {
|
||||
ofs--; // We're referencing symbols that haven't been created yet...
|
||||
if (ofs > UINT32_MAX - anonLabelID) {
|
||||
// We're referencing symbols that haven't been created yet...
|
||||
if (--ofs > UINT32_MAX - anonLabelID) {
|
||||
// LCOV_EXCL_START
|
||||
error(
|
||||
"Reference to anonymous label %" PRIu32 " after, when only %" PRIu32
|
||||
|
||||
Reference in New Issue
Block a user