From b970cf14332b7f2c5e1c65c9f854c39547dec3a4 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Sun, 12 Oct 2014 09:54:46 +0100 Subject: [PATCH] First do visibilty check to reduce branching --- src/libtomahawk/playlist/PlayableProxyModel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libtomahawk/playlist/PlayableProxyModel.cpp b/src/libtomahawk/playlist/PlayableProxyModel.cpp index 6fe5cd5af..88d521d86 100644 --- a/src/libtomahawk/playlist/PlayableProxyModel.cpp +++ b/src/libtomahawk/playlist/PlayableProxyModel.cpp @@ -156,10 +156,10 @@ PlayableProxyModel::filterAcceptsRow( int sourceRow, const QModelIndex& sourcePa bool 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 ) ) return false; + if ( m_hideDupeItems && !dupeFilterAcceptsRow( sourceRow, pi, sourceParent ) ) + return false; return nameFilterAcceptsRow( sourceRow, pi, sourceParent ); }