summaryrefslogtreecommitdiffstats
path: root/src/common/symbols.cpp
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-09-18 02:38:01 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2016-09-18 02:38:01 +0200
commitdc8479928c5aee4c6ad6fe4f59006fb604cee701 (patch)
tree569a7f13128450bbab973236615587ff00bced5f /src/common/symbols.cpp
parentTravis: Import Dolphin’s clang-format hook. (diff)
downloadyuzu-dc8479928c5aee4c6ad6fe4f59006fb604cee701.tar
yuzu-dc8479928c5aee4c6ad6fe4f59006fb604cee701.tar.gz
yuzu-dc8479928c5aee4c6ad6fe4f59006fb604cee701.tar.bz2
yuzu-dc8479928c5aee4c6ad6fe4f59006fb604cee701.tar.lz
yuzu-dc8479928c5aee4c6ad6fe4f59006fb604cee701.tar.xz
yuzu-dc8479928c5aee4c6ad6fe4f59006fb604cee701.tar.zst
yuzu-dc8479928c5aee4c6ad6fe4f59006fb604cee701.zip
Diffstat (limited to 'src/common/symbols.cpp')
-rw-r--r--src/common/symbols.cpp66
1 files changed, 29 insertions, 37 deletions
diff --git a/src/common/symbols.cpp b/src/common/symbols.cpp
index db8340043..c4d16af85 100644
--- a/src/common/symbols.cpp
+++ b/src/common/symbols.cpp
@@ -6,49 +6,41 @@
TSymbolsMap g_symbols;
-namespace Symbols
-{
- bool HasSymbol(u32 address)
- {
- return g_symbols.find(address) != g_symbols.end();
- }
+namespace Symbols {
+bool HasSymbol(u32 address) {
+ return g_symbols.find(address) != g_symbols.end();
+}
+
+void Add(u32 address, const std::string& name, u32 size, u32 type) {
+ if (!HasSymbol(address)) {
+ TSymbol symbol;
+ symbol.address = address;
+ symbol.name = name;
+ symbol.size = size;
+ symbol.type = type;
- void Add(u32 address, const std::string& name, u32 size, u32 type)
- {
- if (!HasSymbol(address))
- {
- TSymbol symbol;
- symbol.address = address;
- symbol.name = name;
- symbol.size = size;
- symbol.type = type;
-
- g_symbols.emplace(address, symbol);
- }
+ g_symbols.emplace(address, symbol);
}
+}
- TSymbol GetSymbol(u32 address)
- {
- const auto iter = g_symbols.find(address);
+TSymbol GetSymbol(u32 address) {
+ const auto iter = g_symbols.find(address);
- if (iter != g_symbols.end())
- return iter->second;
+ if (iter != g_symbols.end())
+ return iter->second;
- return {};
- }
+ return {};
+}
- const std::string GetName(u32 address)
- {
- return GetSymbol(address).name;
- }
+const std::string GetName(u32 address) {
+ return GetSymbol(address).name;
+}
- void Remove(u32 address)
- {
- g_symbols.erase(address);
- }
+void Remove(u32 address) {
+ g_symbols.erase(address);
+}
- void Clear()
- {
- g_symbols.clear();
- }
+void Clear() {
+ g_symbols.clear();
+}
}