vlc | branch: master | Romain Vimont <[email protected]> | Mon Nov 9 10:58:13 2020 +0100| [98bf5dbc5fc726db17a64918f5e853cdf51e48ff] | committer: Alexandre Janniaux
qt: medialib: simplify condition Since idx is unsigned, idx >= 0. As a consequence, m_total_count == 0 implies idx >= m_total_count. Signed-off-by: Alexandre Janniaux <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=98bf5dbc5fc726db17a64918f5e853cdf51e48ff --- modules/gui/qt/medialibrary/mlbasemodel.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gui/qt/medialibrary/mlbasemodel.hpp b/modules/gui/qt/medialibrary/mlbasemodel.hpp index 5ee4bc8026..4da5f5e31d 100644 --- a/modules/gui/qt/medialibrary/mlbasemodel.hpp +++ b/modules/gui/qt/medialibrary/mlbasemodel.hpp @@ -253,7 +253,7 @@ protected: emit countChanged( static_cast<unsigned int>(m_total_count) ); } - if ( m_total_count == 0 || idx >= m_total_count ) + if ( idx >= m_total_count ) return nullptr; if ( idx < m_query_param.i_offset || idx >= m_query_param.i_offset + m_item_list.size() ) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
