Skip to content

Commit

Permalink
fix: clazy-strict-iterators warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiftb0y committed Nov 8, 2024
1 parent 78dce94 commit b33f076
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/library/tabledelegates/coverartdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,9 @@ void CoverArtDelegate::paintItem(
}

void CoverArtDelegate::cleanCacheMissRows() const {
auto it = m_cacheMissRows.begin();
while (it != m_cacheMissRows.end()) {
const QModelIndex index = m_pTableView->model()->index(*it, m_column);
decltype(m_cacheMissRows)::erase_if(m_cacheMissRows, [this](int row) {

Check failure on line 181 in src/library/tabledelegates/coverartdelegate.cpp

View workflow job for this annotation

GitHub Actions / clazy

no member named 'erase_if' in 'QSet<int>'

Check failure on line 181 in src/library/tabledelegates/coverartdelegate.cpp

View workflow job for this annotation

GitHub Actions / clazy

unused parameter 'row' [-Werror,-Wunused-parameter]

Check failure on line 181 in src/library/tabledelegates/coverartdelegate.cpp

View workflow job for this annotation

GitHub Actions / Ubuntu 22.04

‘erase_if’ is not a member of ‘QSet<int>’

Check failure on line 181 in src/library/tabledelegates/coverartdelegate.cpp

View workflow job for this annotation

GitHub Actions / macOS 12 x64

no member named 'erase_if' in 'QSet<int>'

Check failure on line 181 in src/library/tabledelegates/coverartdelegate.cpp

View workflow job for this annotation

GitHub Actions / macOS 12 x64

unused parameter 'row' [-Werror,-Wunused-parameter]

Check failure on line 181 in src/library/tabledelegates/coverartdelegate.cpp

View workflow job for this annotation

GitHub Actions / coverage

‘erase_if’ is not a member of ‘QSet<int>’

Check failure on line 181 in src/library/tabledelegates/coverartdelegate.cpp

View workflow job for this annotation

GitHub Actions / macOS 12 arm64

no member named 'erase_if' in 'QSet<int>'

Check failure on line 181 in src/library/tabledelegates/coverartdelegate.cpp

View workflow job for this annotation

GitHub Actions / macOS 12 arm64

unused parameter 'row' [-Werror,-Wunused-parameter]

Check failure on line 181 in src/library/tabledelegates/coverartdelegate.cpp

View workflow job for this annotation

GitHub Actions / Windows 2019 (MSVC)

'erase_if': is not a member of 'QSet<int>'

Check failure on line 181 in src/library/tabledelegates/coverartdelegate.cpp

View workflow job for this annotation

GitHub Actions / Windows 2019 (MSVC)

'QSet<int>::QSet': no overloaded function takes 2 arguments
const QModelIndex index = m_pTableView->model()->index(row, 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);
} else {
++it;
}
}
return !rect.intersects(m_pTableView->rect());

Check failure on line 184 in src/library/tabledelegates/coverartdelegate.cpp

View workflow job for this annotation

GitHub Actions / clazy

variable 'rect' cannot be implicitly captured in a lambda with no capture-default specified

Check failure on line 184 in src/library/tabledelegates/coverartdelegate.cpp

View workflow job for this annotation

GitHub Actions / macOS 12 x64

variable 'rect' cannot be implicitly captured in a lambda with no capture-default specified

Check failure on line 184 in src/library/tabledelegates/coverartdelegate.cpp

View workflow job for this annotation

GitHub Actions / macOS 12 arm64

variable 'rect' cannot be implicitly captured in a lambda with no capture-default specified
});
}

0 comments on commit b33f076

Please sign in to comment.