Clang-Tidy and Clazy fixes

This commit is contained in:
Jonas Kvinge
2021-06-20 19:04:08 +02:00
parent 755abec636
commit 1295033fae
374 changed files with 1304 additions and 900 deletions

View File

@@ -621,6 +621,7 @@ void AlbumCoverChoiceController::SaveCoverEmbeddedAutomatic(const Song &song, co
SongList songs = watcher->result();
watcher->deleteLater();
QList<QUrl> urls;
urls.reserve(songs.count());
for (const Song &s : songs) urls << s.url();
if (result.is_jpeg()) {
qint64 id = app_->album_cover_loader()->SaveEmbeddedCoverAsync(urls, result.image_data);
@@ -665,6 +666,7 @@ void AlbumCoverChoiceController::SaveCoverEmbeddedAutomatic(const Song &song, co
SongList songs = watcher->result();
watcher->deleteLater();
QList<QUrl> urls;
urls.reserve(songs.count());
for (const Song &s : songs) urls << s.url();
qint64 id = app_->album_cover_loader()->SaveEmbeddedCoverAsync(urls, cover_filename);
QMutexLocker l(&mutex_cover_save_tasks_);
@@ -678,7 +680,7 @@ void AlbumCoverChoiceController::SaveCoverEmbeddedAutomatic(const Song &song, co
}
void AlbumCoverChoiceController::SaveCoverEmbeddedAutomatic(const QList<QUrl> urls, const QImage &image) {
void AlbumCoverChoiceController::SaveCoverEmbeddedAutomatic(const QList<QUrl> &urls, const QImage &image) {
app_->album_cover_loader()->SaveEmbeddedCoverAsync(urls, image);