Commit 74b86c84 authored by Michael Pyne's avatar Michael Pyne
Browse files

Fix compiler warnings about needless copies, spotted by clang-11.

parent cdfb6935
Pipeline #50064 passed with stage
in 10 minutes and 51 seconds
......@@ -83,7 +83,7 @@ void DynamicPlaylist::setPlaylists(const PlaylistList &playlists)
void DynamicPlaylist::slotReload()
{
for(const auto playlist : m_playlists) {
for(const auto &playlist : m_playlists) {
if(!playlist)
continue;
playlist->slotReload();
......@@ -101,7 +101,7 @@ void DynamicPlaylist::lower(QWidget *top)
PlaylistList l;
l.append(this);
for(const auto playlist : m_playlists) {
for(const auto &playlist : m_playlists) {
if(!playlist)
continue;
playlist->synchronizePlayingItems(l, true);
......@@ -145,7 +145,7 @@ void DynamicPlaylist::updateItems()
{
PlaylistItemList siblings;
for(const auto playlist : qAsConst(m_playlists)) {
for(const auto &playlist : qAsConst(m_playlists)) {
if(!playlist)
continue;
siblings += playlist->items();
......@@ -156,7 +156,7 @@ void DynamicPlaylist::updateItems()
this->synchronizeItemsTo(siblings);
if(m_synchronizePlaying) {
for(const auto playlist : m_playlists) {
for(const auto &playlist : m_playlists) {
synchronizePlayingItems(playlist, true);
}
}
......
......@@ -1574,7 +1574,7 @@ QFuture<void> Playlist::addFilesFromDirectory(const QString &dirPath)
);
connect(loader, &DirectoryLoader::loadedFiles, this,
[this](const FileHandleList &newFiles) {
for(const auto newFile : newFiles) {
for(const auto &newFile : newFiles) {
createItem(newFile);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment