Skip to content

Commit

Permalink
TrackDAO: Use std::size to calculate the static array size
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde committed Jan 18, 2022
1 parent e6eb30c commit 3b2e520
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/library/dao/trackdao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,7 @@ TrackPointer TrackDAO::getTrackById(TrackId trackId) const {
{"coverart_digest", nullptr},
{"coverart_hash", nullptr},
};
constexpr int columnsCount = sizeof(columns) / sizeof(columns[0]);
constexpr int columnsCount = std::size(columns);

// Accessing the database is a time consuming operation that should not
// be executed with a lock on the GlobalTrackCache. The GlobalTrackCache
Expand Down

0 comments on commit 3b2e520

Please sign in to comment.