mirror of
https://github.com/gbdev/rgbds.git
synced 2026-11-21 21:48:39 +00:00
Tiny refactor
This commit is contained in:
1 parent
df66063eb4
commit
6818759a8c
1 file changed
+2
-2
+2
-2
@@ -98,9 +98,9 @@ void Expression::makeBankSymbol(InternedStr symName) {
|
||||
} else {
|
||||
sym = sym_Ref(symName);
|
||||
assume(sym); // If the symbol didn't exist, it should have been created
|
||||
if (sym->getSection() && sym->getSection()->bank != UINT32_MAX) {
|
||||
if (Section *symSect = sym->getSection(); symSect && symSect->bank != UINT32_MAX) {
|
||||
// Symbol's section is known and bank is fixed
|
||||
data = static_cast<int32_t>(sym->getSection()->bank);
|
||||
data = static_cast<int32_t>(symSect->bank);
|
||||
} else {
|
||||
data = sym_IsPurgedScoped(symName)
|
||||
? "`"s + symName.str() + "`'s bank is not known; it was purged"
|
||||
|
||||
Reference in new issue
Block a user