mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-25 18:46:55 +01:00
debugger: Slightly optimize symbol list updates
This commit is contained in:
parent
026d547dcc
commit
252429933f
@ -46,25 +46,25 @@ SymbolListCtrl::SymbolListCtrl(wxWindow* parent, const wxWindowID& id, const wxP
|
|||||||
void SymbolListCtrl::OnGameLoaded()
|
void SymbolListCtrl::OnGameLoaded()
|
||||||
{
|
{
|
||||||
m_data.clear();
|
m_data.clear();
|
||||||
long itemId = 0;
|
|
||||||
const auto symbol_map = rplSymbolStorage_lockSymbolMap();
|
const auto symbol_map = rplSymbolStorage_lockSymbolMap();
|
||||||
for (auto const& [address, symbol_info] : symbol_map)
|
for (auto const& [address, symbol_info] : symbol_map)
|
||||||
{
|
{
|
||||||
if (symbol_info == nullptr || symbol_info->symbolName == nullptr)
|
if (symbol_info == nullptr || symbol_info->symbolName == nullptr)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
wxString libNameWX = wxString::FromAscii((const char*)symbol_info->libName);
|
||||||
|
wxString symbolNameWX = wxString::FromAscii((const char*)symbol_info->symbolName);
|
||||||
|
wxString searchNameWX = libNameWX + symbolNameWX;
|
||||||
|
searchNameWX.MakeLower();
|
||||||
|
|
||||||
auto new_entry = m_data.try_emplace(
|
auto new_entry = m_data.try_emplace(
|
||||||
symbol_info->address,
|
symbol_info->address,
|
||||||
(char*)(symbol_info->symbolName),
|
symbolNameWX,
|
||||||
(char*)(symbol_info->libName),
|
libNameWX,
|
||||||
"",
|
searchNameWX,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
new_entry.first->second.searchName += new_entry.first->second.name;
|
|
||||||
new_entry.first->second.searchName += new_entry.first->second.libName;
|
|
||||||
new_entry.first->second.searchName.MakeLower();
|
|
||||||
|
|
||||||
if (m_list_filter.IsEmpty())
|
if (m_list_filter.IsEmpty())
|
||||||
new_entry.first->second.visible = true;
|
new_entry.first->second.visible = true;
|
||||||
else if (new_entry.first->second.searchName.Contains(m_list_filter))
|
else if (new_entry.first->second.searchName.Contains(m_list_filter))
|
||||||
|
Loading…
Reference in New Issue
Block a user