diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-09-07 22:08:54 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-09-07 22:08:54 +0000 |
| commit | 1e31fe896524513577911e382897b841e40a4814 (patch) | |
| tree | 153483337dcab82e0bc32cc19f7876a7eb9593c7 /src/plugins/Effect/ladspa/ladspahost.cpp | |
| parent | 1d6f69e20769d902a70001277199129361d0a761 (diff) | |
| download | qmmp-1e31fe896524513577911e382897b841e40a4814.tar.gz qmmp-1e31fe896524513577911e382897b841e40a4814.tar.bz2 qmmp-1e31fe896524513577911e382897b841e40a4814.zip | |
removed foreach macro
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9067 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Effect/ladspa/ladspahost.cpp')
| -rw-r--r-- | src/plugins/Effect/ladspa/ladspahost.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/Effect/ladspa/ladspahost.cpp b/src/plugins/Effect/ladspa/ladspahost.cpp index b962f3d81..8688ab756 100644 --- a/src/plugins/Effect/ladspa/ladspahost.cpp +++ b/src/plugins/Effect/ladspa/ladspahost.cpp @@ -56,7 +56,7 @@ LADSPAHost::LADSPAHost(QObject *parent) : QObject(parent) int id = settings.value("id").toInt(); LADSPAPlugin *plugin = nullptr; - foreach(LADSPAPlugin *p, plugins()) + for(LADSPAPlugin *p : plugins()) { if(p->unique_id == id) { @@ -68,7 +68,7 @@ LADSPAHost::LADSPAHost(QObject *parent) : QObject(parent) continue; LADSPAEffect *effect = createEffect(plugin); - foreach (LADSPAControl *c, effect->controls) + for(LADSPAControl *c : qAsConst(effect->controls)) c->value = settings.value(QString("port%1").arg(c->port), c->value).toFloat(); m_effects.append(effect); @@ -92,7 +92,7 @@ LADSPAHost::~LADSPAHost() settings.setValue("id", (quint64)m_effects[i]->plugin->desc->UniqueID); - foreach (LADSPAControl *c, m_effects[i]->controls) + for(const LADSPAControl *c : qAsConst(m_effects[i]->controls)) settings.setValue(QString("port%1").arg(c->port), c->value); settings.endGroup(); @@ -105,7 +105,7 @@ void LADSPAHost::configure(quint32 freq, int chan) m_chan = chan; m_freq = freq; - foreach (LADSPAEffect *e, m_effects) + for(LADSPAEffect *e : qAsConst(m_effects)) { //deactivate effect deactivateEffect(e); @@ -149,7 +149,7 @@ void LADSPAHost::loadModules() } else directories = ladspa_path.split(':'); - foreach(QString dir, directories) + for(const QString &dir : qAsConst(directories)) findModules(dir); } @@ -160,7 +160,7 @@ void LADSPAHost::findModules(const QString &path) dir.setSorting(QDir::Name); QFileInfoList files = dir.entryInfoList((QStringList() << "*.so")); - foreach(QFileInfo file, files) + for(const QFileInfo &file : qAsConst(files)) { void *library = dlopen(qPrintable(file.absoluteFilePath ()), RTLD_LAZY); if (!library) @@ -359,15 +359,15 @@ void LADSPAHost::activateEffect(LADSPAEffect *e) { LADSPA_Handle handle = desc->instantiate(desc, m_freq); - foreach (LADSPAControl *c, e->controls) + for(LADSPAControl *c : qAsConst(e->controls)) { desc->connect_port(handle, c->port, &c->value); } - foreach (int port, e->in_ports) + for(int port : qAsConst(e->in_ports)) { desc->connect_port(handle, port, m_buf[in_at++]); } - foreach (int port, e->out_ports) + for(int port : qAsConst(e->out_ports)) { desc->connect_port(handle, port, m_buf[out_at++]); } @@ -381,7 +381,7 @@ void LADSPAHost::activateEffect(LADSPAEffect *e) void LADSPAHost::deactivateEffect(LADSPAEffect *e) { const LADSPA_Descriptor *desc = e->plugin->desc; - foreach (LADSPA_Handle handle, e->handles) + for(const LADSPA_Handle &handle : qAsConst(e->handles)) { if(desc->deactivate) desc->deactivate(handle); |
