Use std::transform in libkwineffects implementation part
ClosedPublic

Authored by zzag on Jul 1 2018, 8:49 AM.

Details

Summary

Don't use raw loops, instead, use appropriate algorithm from STL to map
a list of toplevels to a list of EffectWindow.

Test Plan

Tested Cover switch, Flip switch, Dialog parent, and Dim inactive effect.
They all still work.

Diff Detail

Repository
R108 KWin
Branch
libkwineffects-impl-std-transform
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 535
Build 547: arc lint + arc unit
zzag created this revision.Jul 1 2018, 8:49 AM
Restricted Application added a project: KWin. · View Herald TranscriptJul 1 2018, 8:49 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Jul 1 2018, 8:49 AM
graesslin accepted this revision.Jul 1 2018, 2:19 PM
graesslin added a subscriber: graesslin.

Nice. To our defense: c++ wasn't that nice when that code was written.

effects.cpp
1086

I would just use (auto client) - we can use c++14 in KWin.

This revision is now accepted and ready to land.Jul 1 2018, 2:19 PM
zzag marked an inline comment as done.Jul 1 2018, 3:19 PM
This revision was automatically updated to reflect the committed changes.