SignatureDB: Use explicit construction

This commit is contained in:
Sepalani 2017-03-24 19:47:41 +00:00
parent a9b52ce91b
commit 82afda94f4
3 changed files with 4 additions and 4 deletions

View File

@ -302,7 +302,7 @@ bool CBoot::BootUp()
if (_StartupPara.bHLE_BS2 && !_StartupPara.bEnableDebugging) if (_StartupPara.bHLE_BS2 && !_StartupPara.bEnableDebugging)
{ {
PPCAnalyst::FindFunctions(0x80004000, 0x811fffff, &g_symbolDB); PPCAnalyst::FindFunctions(0x80004000, 0x811fffff, &g_symbolDB);
SignatureDB db; SignatureDB db(SignatureDB::HandlerType::DSY);
if (db.Load(File::GetSysDirectory() + TOTALDB)) if (db.Load(File::GetSysDirectory() + TOTALDB))
{ {
db.Apply(&g_symbolDB); db.Apply(&g_symbolDB);

View File

@ -23,7 +23,7 @@ public:
DSY, DSY,
CSV CSV
}; };
explicit SignatureDB(HandlerType handler = HandlerType::DSY); explicit SignatureDB(HandlerType handler);
explicit SignatureDB(const std::string& file_path); explicit SignatureDB(const std::string& file_path);
static HandlerType GetHandlerType(const std::string& file_path); static HandlerType GetHandlerType(const std::string& file_path);

View File

@ -190,7 +190,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
case IDM_SCAN_SIGNATURES: case IDM_SCAN_SIGNATURES:
{ {
PPCAnalyst::FindFunctions(0x80000000, 0x81800000, &g_symbolDB); PPCAnalyst::FindFunctions(0x80000000, 0x81800000, &g_symbolDB);
SignatureDB db; SignatureDB db(SignatureDB::HandlerType::DSY);
if (db.Load(File::GetSysDirectory() + TOTALDB)) if (db.Load(File::GetSysDirectory() + TOTALDB))
{ {
db.Apply(&g_symbolDB); db.Apply(&g_symbolDB);
@ -239,7 +239,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
{ {
g_symbolDB.Clear(); g_symbolDB.Clear();
PPCAnalyst::FindFunctions(0x81300000, 0x81800000, &g_symbolDB); PPCAnalyst::FindFunctions(0x81300000, 0x81800000, &g_symbolDB);
SignatureDB db; SignatureDB db(SignatureDB::HandlerType::DSY);
if (db.Load(File::GetSysDirectory() + TOTALDB)) if (db.Load(File::GetSysDirectory() + TOTALDB))
db.Apply(&g_symbolDB); db.Apply(&g_symbolDB);
Parent->StatusBarMessage("'%s' not found, scanning for common functions instead", Parent->StatusBarMessage("'%s' not found, scanning for common functions instead",