PPCSymbolDB: GetDescription by std::string_view
Should save a lot of deep copies.
This commit is contained in:
1 parent
1bfeeb8a63
commit
672be6a8cf
12 files changed
+49
-29
No files matched your search
@@ -108,13 +108,11 @@ Common::Symbol* PPCSymbolDB::GetSymbolFromAddr(u32 addr)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::string PPCSymbolDB::GetDescription(u32 addr)
|
||||
std::string_view PPCSymbolDB::GetDescription(u32 addr)
|
||||
{
|
||||
Common::Symbol* symbol = GetSymbolFromAddr(addr);
|
||||
if (symbol)
|
||||
if (const Common::Symbol* const symbol = GetSymbolFromAddr(addr))
|
||||
return symbol->name;
|
||||
else
|
||||
return " --- ";
|
||||
return " --- ";
|
||||
}
|
||||
|
||||
void PPCSymbolDB::FillInCallers()
|
||||
|
||||
Reference in new issue
Block a user