diff --git a/src/emucore/elf/ElfLinker.cxx b/src/emucore/elf/ElfLinker.cxx index c100b9dee..7125647eb 100644 --- a/src/emucore/elf/ElfLinker.cxx +++ b/src/emucore/elf/ElfLinker.cxx @@ -157,7 +157,7 @@ ElfLinker::RelocatedSymbol ElfLinker::findRelocatedSymbol(string_view name) cons if (!myRelocatedSymbols[i]) ElfSymbolResolutionError::raise("symbol could not be relocated"); - return *myRelocatedSymbols[i]; // FIXME: bugprone-unchecked-optional-access + return myRelocatedSymbols[i].value(); } ElfSymbolResolutionError::raise("symbol not found"); @@ -408,7 +408,7 @@ void ElfLinker::copyInitArrays(vector& initArray, const std::unordered_m void ElfLinker::applyRelocationToSection(const ElfFile::Relocation& relocation, size_t iSection) { const auto& targetSection = myElf.getSections()[iSection]; - const auto& targetSectionRelocated = *myRelocatedSections[iSection]; // FIXME: bugprone-unchecked-optional-access + const auto& targetSectionRelocated = myRelocatedSections[iSection].value(); const auto& symbol = myElf.getSymbols()[relocation.symbol]; const auto& relocatedSymbol = myRelocatedSymbols[relocation.symbol];