Commit f2ac2269 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use ref

parent bf197718
......@@ -468,7 +468,7 @@ QString Mixer::getBaseName() const
return mixer->_mixerBackend->recommendedMaster();
}
for (const shared_ptr<MixDevice> md : qAsConst(mixer->_mixerBackend->m_mixDevices))
for (const shared_ptr<MixDevice> &md : qAsConst(mixer->_mixerBackend->m_mixDevices))
{
if (!md) continue; // invalid
......@@ -516,7 +516,7 @@ void Mixer::setLocalMasterMD(const QString &devPK)
shared_ptr<MixDevice> Mixer::find(const QString &mixdeviceID) const
{
shared_ptr<MixDevice> mdRet;
for (const shared_ptr<MixDevice> md : qAsConst(_mixerBackend->m_mixDevices))
for (const shared_ptr<MixDevice> &md : qAsConst(_mixerBackend->m_mixDevices))
{
if (!md) continue; // invalid
if (md->id()==mixdeviceID)
......
......@@ -84,7 +84,7 @@ QString DBusMixerWrapper::driverName()
QStringList DBusMixerWrapper::controls()
{
QStringList result;
for (const shared_ptr<MixDevice> md : qAsConst(m_mixer->getMixSet()))
for (const shared_ptr<MixDevice> &md : qAsConst(m_mixer->getMixSet()))
{
result.append( md->dbusPath() );
}
......
......@@ -1124,7 +1124,7 @@ void MDWSlider::showMoveMenu()
m_moveMenu->addSeparator();
// Device actions
for (const shared_ptr<MixDevice> md : *ms)
for (const shared_ptr<MixDevice> &md : *ms)
{
act = new QAction(QIcon::fromTheme(md->iconName()), md->readableName(), m_moveMenu);
act->setData(md->id());
......
......@@ -154,7 +154,7 @@ void ViewBase::createDeviceWidgets()
qCDebug(KMIX_LOG) << id() << "orientation" << _orientation;
initLayout();
for (const shared_ptr<MixDevice> md : qAsConst(_mixSet))
for (const shared_ptr<MixDevice> &md : qAsConst(_mixSet))
{
QWidget *mdw = add(md); // a) Let the implementation do its work
_mdws.append(mdw); // b) Add it to the local list
......
Supports Markdown
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