Commit 81d851f6 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[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
parent f48cf072
......@@ -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());
}
......
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