mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Avoid using std::get except in holds_alternative-asserting accessors
This commit is contained in:
@@ -340,11 +340,11 @@ static void readSection(FILE *file, Section §ion, char const *fileName,
|
||||
static void linkSymToSect(Symbol &symbol, Section §ion)
|
||||
{
|
||||
uint32_t a = 0, b = section.symbols.size();
|
||||
int32_t symbolOffset = std::get<Label>(symbol.data).offset;
|
||||
int32_t symbolOffset = symbol.label().offset;
|
||||
|
||||
while (a != b) {
|
||||
uint32_t c = (a + b) / 2;
|
||||
int32_t otherOffset = std::get<Label>(section.symbols[c]->data).offset;
|
||||
int32_t otherOffset = section.symbols[c]->label().offset;
|
||||
|
||||
if (otherOffset > symbolOffset)
|
||||
b = c;
|
||||
|
||||
Reference in New Issue
Block a user