[libkwineffects] Use std::copy

Summary: Don't use raw loop, use an algorithm from STL to copy effect pairs.

Test Plan: Effects are still working.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14004
This commit is contained in:
Vlad Zagorodniy 2018-07-09 15:36:27 +03:00
parent f48cf072f9
commit 81d851f6aa

View file

@ -1417,11 +1417,11 @@ void EffectsHandlerImpl::effectsChanged()
{
loaded_effects.clear();
m_activeEffects.clear(); // it's possible to have a reconfigure and a quad rebuild between two paint cycles - bug #308201
// qDebug() << "Recreating effects' list:";
for (const EffectPair & effect : effect_order) {
// qDebug() << effect.first;
loaded_effects.append(effect);
}
loaded_effects.reserve(effect_order.count());
std::copy(effect_order.constBegin(), effect_order.constEnd(),
std::back_inserter(loaded_effects));
m_activeEffects.reserve(loaded_effects.count());
}