[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:
parent
f48cf072f9
commit
81d851f6aa
1 changed files with 5 additions and 5 deletions
10
effects.cpp
10
effects.cpp
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue