Fix getNearestFunctionSymbolData

This commit is contained in:
Maschell 2023-11-27 17:45:56 +01:00
parent 96f385176a
commit d1f701abab

View File

@ -93,7 +93,7 @@ public:
return mTrampolineId; return mTrampolineId;
} }
[[nodiscard]] std::optional<FunctionSymbolData> getNearestFunctionSymbolData(uint32_t address) const { [[nodiscard]] FunctionSymbolData *getNearestFunctionSymbolData(uint32_t address) const {
FunctionSymbolData *result = nullptr; FunctionSymbolData *result = nullptr;
bool foundHit = false; bool foundHit = false;
@ -107,10 +107,10 @@ public:
} }
} }
if (!foundHit) { if (!foundHit) {
return std::nullopt; return nullptr;
} }
return *result; return result;
} }
[[nodiscard]] const HeapMemoryFixedSize &getTextMemory() const { [[nodiscard]] const HeapMemoryFixedSize &getTextMemory() const {