CResourceProxyModel: Simplify exit cases in filterAcceptsRow()

This commit is contained in:
Lioncache
2025-12-08 15:42:55 -05:00
parent e231158b1d
commit 69290914b8

View File

@@ -61,16 +61,17 @@ bool CResourceProxyModel::filterAcceptsRow(int SourceRow, const QModelIndex& rkS
if (pEntry && !IsTypeAccepted(pEntry->TypeInfo()))
return false;
// Compare search results
if (!mSearchString.IsEmpty())
{
if (mSearchString.IsEmpty())
return true;
if (!pEntry)
return false;
// Compare search results
const bool HasNameMatch = pEntry->UppercaseName().Contains(mSearchString);
if (HasNameMatch)
return true;
if (!HasNameMatch)
{
bool HasIDMatch = false;
if (mCompareBitLength > 0)
@@ -98,8 +99,6 @@ bool CResourceProxyModel::filterAcceptsRow(int SourceRow, const QModelIndex& rkS
if (!HasIDMatch)
return false;
}
}
return true;
}