Use isEmpty() instead of size() for emptiness

This commit is contained in:
thalieht
2019-02-13 17:51:07 +02:00
parent d8cbc9266a
commit 400792d18e
6 changed files with 7 additions and 7 deletions

View File

@@ -157,7 +157,7 @@ bool CookiesModel::insertRows(int row, int count, const QModelIndex &parent)
bool CookiesModel::removeRows(int row, int count, const QModelIndex &parent)
{
if ((m_cookies.size() == 0)
if ((m_cookies.isEmpty())
|| (row >= m_cookies.size())
|| ((row + count) > m_cookies.size()))
return false;