Skip to content

Commit

Permalink
reduce dependency on ColumnCache::NUM_COLUMNS
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Oct 22, 2024
1 parent 3940070 commit 31473f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/library/columncache.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ColumnCache : public QObject {
void setColumns(QStringList columns);

inline int fieldIndex(Column column) const {
if (column < 0 || column >= NUM_COLUMNS) {
if (static_cast<size_t>(column) >= std::size(m_columnIndexByEnum)) {
return -1;
}
return m_columnIndexByEnum[column];
Expand Down

0 comments on commit 31473f6

Please sign in to comment.