[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(); loaded_effects.clear();
m_activeEffects.clear(); // it's possible to have a reconfigure and a quad rebuild between two paint cycles - bug #308201 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) { loaded_effects.reserve(effect_order.count());
// qDebug() << effect.first; std::copy(effect_order.constBegin(), effect_order.constEnd(),
loaded_effects.append(effect); std::back_inserter(loaded_effects));
}
m_activeEffects.reserve(loaded_effects.count()); m_activeEffects.reserve(loaded_effects.count());
} }