From 7dc0bdd5dfaa7aa8f6902126c1e05b0ee23d45a9 Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Fri, 24 May 2024 17:05:14 -0700 Subject: [PATCH] BranchWatchProxyModel: Avoid String Copies In filterAcceptsRow --- Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp index c20b2e3c2d..e6c3e7341e 100644 --- a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp +++ b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp @@ -141,15 +141,15 @@ bool BranchWatchProxyModel::filterAcceptsRow(int source_row, const QModelIndex&) if (!m_origin_symbol_name.isEmpty()) { if (const QVariant& symbol_name_v = sourceModel()->GetSymbolList()[source_row].origin_name; - !symbol_name_v.isValid() || - !symbol_name_v.value().contains(m_origin_symbol_name, Qt::CaseInsensitive)) + !symbol_name_v.isValid() || !static_cast(symbol_name_v.data()) + ->contains(m_origin_symbol_name, Qt::CaseInsensitive)) return false; } if (!m_destin_symbol_name.isEmpty()) { if (const QVariant& symbol_name_v = sourceModel()->GetSymbolList()[source_row].destin_name; - !symbol_name_v.isValid() || - !symbol_name_v.value().contains(m_destin_symbol_name, Qt::CaseInsensitive)) + !symbol_name_v.isValid() || !static_cast(symbol_name_v.data()) + ->contains(m_destin_symbol_name, Qt::CaseInsensitive)) return false; } return true;