From d94cf17e8885d4a04919e312d755c6873e1f6799 Mon Sep 17 00:00:00 2001 From: oltolm Date: Sun, 7 Dec 2025 15:24:35 +0100 Subject: [PATCH] UI: replace std::string with wxString in ChangeListFilter --- src/gui/wxgui/debugger/SymbolCtrl.cpp | 4 ++-- src/gui/wxgui/debugger/SymbolCtrl.h | 5 +++-- src/gui/wxgui/debugger/SymbolWindow.cpp | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gui/wxgui/debugger/SymbolCtrl.cpp b/src/gui/wxgui/debugger/SymbolCtrl.cpp index a02269fe..8e70082b 100644 --- a/src/gui/wxgui/debugger/SymbolCtrl.cpp +++ b/src/gui/wxgui/debugger/SymbolCtrl.cpp @@ -141,9 +141,9 @@ void SymbolListCtrl::OnRightClick(wxListEvent& event) #endif } -void SymbolListCtrl::ChangeListFilter(std::string filter) +void SymbolListCtrl::ChangeListFilter(wxString filter) { - m_list_filter = wxString(filter).MakeLower(); + m_list_filter = filter.MakeLower(); size_t visible_entries = m_data.size(); for (auto& [address, symbol] : m_data) diff --git a/src/gui/wxgui/debugger/SymbolCtrl.h b/src/gui/wxgui/debugger/SymbolCtrl.h index 8a0161bd..cb592ee7 100644 --- a/src/gui/wxgui/debugger/SymbolCtrl.h +++ b/src/gui/wxgui/debugger/SymbolCtrl.h @@ -8,8 +8,9 @@ public: SymbolListCtrl(wxWindow* parent, const wxWindowID& id, const wxPoint& pos, const wxSize& size); void OnGameLoaded(); - void ChangeListFilter(std::string filter); -private: + void ChangeListFilter(wxString filter); + + private: struct SymbolItem { SymbolItem() = default; SymbolItem(wxString name, wxString libName, wxString searchName, bool visible) : name(name), libName(libName), searchName(searchName), visible(visible) {} diff --git a/src/gui/wxgui/debugger/SymbolWindow.cpp b/src/gui/wxgui/debugger/SymbolWindow.cpp index c7aad6c8..663e599d 100644 --- a/src/gui/wxgui/debugger/SymbolWindow.cpp +++ b/src/gui/wxgui/debugger/SymbolWindow.cpp @@ -48,5 +48,5 @@ void SymbolWindow::OnGameLoaded() void SymbolWindow::OnFilterChanged(wxCommandEvent& event) { - m_symbol_ctrl->ChangeListFilter(m_filter->GetValue().ToStdString()); + m_symbol_ctrl->ChangeListFilter(m_filter->GetValue()); }