1
0
Fork 0
forked from suyu/suyu

symbols: Simplify GetSymbol

This commit is contained in:
Lioncash 2015-09-30 11:51:06 -04:00
parent a67df5ad94
commit 052eacc3b9

View file

@ -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 symbol; return {};
} }
const std::string GetName(u32 _address) const std::string GetName(u32 _address)
{ {
return GetSymbol(_address).name; return GetSymbol(_address).name;