summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2015-09-30 17:51:06 +0200
committerLioncash <mathew1800@gmail.com>2015-09-30 17:51:06 +0200
commit052eacc3b9345ce68048e31657e518241c5b004d (patch)
treeaf09068ab768dac167e0af84c32eb65b78d265d8 /src/common
parentMerge pull request #1172 from martinlindhe/fix-warnings (diff)
downloadyuzu-052eacc3b9345ce68048e31657e518241c5b004d.tar
yuzu-052eacc3b9345ce68048e31657e518241c5b004d.tar.gz
yuzu-052eacc3b9345ce68048e31657e518241c5b004d.tar.bz2
yuzu-052eacc3b9345ce68048e31657e518241c5b004d.tar.lz
yuzu-052eacc3b9345ce68048e31657e518241c5b004d.tar.xz
yuzu-052eacc3b9345ce68048e31657e518241c5b004d.tar.zst
yuzu-052eacc3b9345ce68048e31657e518241c5b004d.zip
Diffstat (limited to '')
-rw-r--r--src/common/symbols.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/common/symbols.cpp b/src/common/symbols.cpp
index f23e51c9d..2115dc062 100644
--- a/src/common/symbols.cpp
+++ b/src/common/symbols.cpp
@@ -29,17 +29,14 @@ namespace Symbols
TSymbol GetSymbol(u32 _address)
{
- TSymbolsMap::iterator foundSymbolItr;
- TSymbol symbol;
+ const auto iter = g_symbols.find(_address);
- foundSymbolItr = g_symbols.find(_address);
- if (foundSymbolItr != g_symbols.end())
- {
- symbol = (*foundSymbolItr).second;
- }
+ if (iter != g_symbols.end())
+ return iter->second;
- return symbol;
+ return {};
}
+
const std::string GetName(u32 _address)
{
return GetSymbol(_address).name;