Skip to content

Commit

Permalink
Use std::as_const do avoid detached loop
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer authored Oct 2, 2024
1 parent c7a10eb commit 18d556d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/library/coverartdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void CoverArtDelegate::slotInhibitLazyLoading(
const double scaleFactor = m_pTableView->devicePixelRatioF();
const int width = static_cast<int>(m_pTableView->columnWidth(m_column) * scaleFactor);

for (int row : m_cacheMissRows) {
for (int row : std::as_const(m_cacheMissRows)) {
QModelIndex index = m_pTableView->model()->index(row, m_column);
CoverInfo coverInfo = m_pTrackModel->getCoverInfo(index);
QRect rect = m_pTableView->visualRect(index);
Expand Down

0 comments on commit 18d556d

Please sign in to comment.