Skip to content

Commit

Permalink
Make iterator const
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Nov 8, 2024
1 parent 9c53c48 commit 6eb8760
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/library/tabledelegates/coverartdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ void CoverArtDelegate::paintItem(
}

void CoverArtDelegate::cleanCacheMissRows() const {
auto it = m_cacheMissRows.begin();
while (it != m_cacheMissRows.end()) {
auto it = m_cacheMissRows.cbegin();
while (it != m_cacheMissRows.cend()) {
const QModelIndex index = m_pTableView->model()->index(*it, m_column);
const QRect rect = m_pTableView->visualRect(index);
if (!rect.intersects(m_pTableView->rect())) {
// Cover image row is no longer shown. We keep the set
// small which likely reuses the allocatd memory later
it = m_cacheMissRows.erase(it);
it = constErase(&m_cacheMissRows, it);
} else {
++it;
}
Expand Down

0 comments on commit 6eb8760

Please sign in to comment.