SymbolDB: Use an enum class for representing symbol type

This commit is contained in:
Lioncash
2016-09-13 21:01:35 -04:00
parent d8d127df25
commit 0ac77b0288
8 changed files with 16 additions and 15 deletions

View File

@ -47,13 +47,14 @@ Symbol* PPCSymbolDB::AddFunction(u32 startAddr)
return nullptr; // found a dud :(
// LOG(OSHLE, "Symbol found at %08x", startAddr);
functions[startAddr] = tempFunc;
tempFunc.type = Symbol::SYMBOL_FUNCTION;
tempFunc.type = Symbol::Type::Function;
checksumToFunction[tempFunc.hash] = &(functions[startAddr]);
return &functions[startAddr];
}
}
void PPCSymbolDB::AddKnownSymbol(u32 startAddr, u32 size, const std::string& name, int type)
void PPCSymbolDB::AddKnownSymbol(u32 startAddr, u32 size, const std::string& name,
Symbol::Type type)
{
XFuncMap::iterator iter = functions.find(startAddr);
if (iter != functions.end())
@ -72,7 +73,7 @@ void PPCSymbolDB::AddKnownSymbol(u32 startAddr, u32 size, const std::string& nam
tf.name = name;
tf.type = type;
tf.address = startAddr;
if (tf.type == Symbol::SYMBOL_FUNCTION)
if (tf.type == Symbol::Type::Function)
{
PPCAnalyst::AnalyzeFunction(startAddr, tf, size);
checksumToFunction[tf.hash] = &(functions[startAddr]);