mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-29 23:06:23 -05:00
symbols: Simplify GetSymbol
This commit is contained in:
parent
a67df5ad94
commit
052eacc3b9
1 changed files with 5 additions and 8 deletions
|
@ -29,17 +29,14 @@ namespace Symbols
|
||||||
|
|
||||||
TSymbol GetSymbol(u32 _address)
|
TSymbol GetSymbol(u32 _address)
|
||||||
{
|
{
|
||||||
TSymbolsMap::iterator foundSymbolItr;
|
const auto iter = g_symbols.find(_address);
|
||||||
TSymbol symbol;
|
|
||||||
|
|
||||||
foundSymbolItr = g_symbols.find(_address);
|
if (iter != g_symbols.end())
|
||||||
if (foundSymbolItr != g_symbols.end())
|
return iter->second;
|
||||||
{
|
|
||||||
symbol = (*foundSymbolItr).second;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
return symbol;
|
|
||||||
}
|
|
||||||
const std::string GetName(u32 _address)
|
const std::string GetName(u32 _address)
|
||||||
{
|
{
|
||||||
return GetSymbol(_address).name;
|
return GetSymbol(_address).name;
|
||||||
|
|
Loading…
Reference in a new issue