Make const

This commit is contained in:
Jonas Kvinge 2021-07-12 07:38:49 +02:00
parent e8694531f6
commit fec7419fcc
2 changed files with 4 additions and 3 deletions

View File

@ -1092,7 +1092,8 @@ QString TidalRequest::ParseSong(Song &song, const QJsonObject &json_obj, const Q
void TidalRequest::GetAlbumCovers() {
for (Song &song : songs_) {
const SongList songs = songs_.values();
for (const Song &song : songs) {
AddAlbumCoverRequest(song);
}
FlushAlbumCoverRequests();
@ -1104,7 +1105,7 @@ void TidalRequest::GetAlbumCovers() {
}
void TidalRequest::AddAlbumCoverRequest(Song &song) {
void TidalRequest::AddAlbumCoverRequest(const Song &song) {
if (album_covers_requests_sent_.contains(song.album_id())) {
album_covers_requests_sent_.insert(song.album_id(), song.song_id());

View File

@ -138,7 +138,7 @@ class TidalRequest : public TidalBaseRequest {
QString ParseSong(Song &song, const QJsonObject &json_obj, const QString &artist_id_requested = QString(), const QString &album_id_requested = QString(), const QString &album_artist = QString(), const QString &album_album = QString(), const bool album_explicit = false);
void GetAlbumCovers();
void AddAlbumCoverRequest(Song &song);
void AddAlbumCoverRequest(const Song &song);
void FlushAlbumCoverRequests();
void AlbumCoverFinishCheck();