mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
First do visibilty check to reduce branching
This commit is contained in:
@@ -156,10 +156,10 @@ PlayableProxyModel::filterAcceptsRow( int sourceRow, const QModelIndex& sourcePa
|
|||||||
bool
|
bool
|
||||||
PlayableProxyModel::filterAcceptsRowInternal( int sourceRow, PlayableItem* pi, const QModelIndex& sourceParent ) const
|
PlayableProxyModel::filterAcceptsRowInternal( int sourceRow, PlayableItem* pi, const QModelIndex& sourceParent ) const
|
||||||
{
|
{
|
||||||
if ( m_hideDupeItems && !dupeFilterAcceptsRow( sourceRow, pi, sourceParent ) )
|
|
||||||
return false;
|
|
||||||
if ( m_maxVisibleItems > 0 && !visibilityFilterAcceptsRow( sourceRow, sourceParent ) )
|
if ( m_maxVisibleItems > 0 && !visibilityFilterAcceptsRow( sourceRow, sourceParent ) )
|
||||||
return false;
|
return false;
|
||||||
|
if ( m_hideDupeItems && !dupeFilterAcceptsRow( sourceRow, pi, sourceParent ) )
|
||||||
|
return false;
|
||||||
|
|
||||||
return nameFilterAcceptsRow( sourceRow, pi, sourceParent );
|
return nameFilterAcceptsRow( sourceRow, pi, sourceParent );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user