Use std::find_if in EffectsHandlerImpl::isEffectLoaded
ClosedPublic

Authored by zzag on Jul 2 2018, 7:56 AM.

Details

Summary

Don't use raw loops. Use appropriate algorithm from STL to find out
whether effect with the given name is loaded.

(also, this change deletes duplicated logic)

Diff Detail

Repository
R108 KWin
Branch
libkwineffects-impl-find-if
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 545
Build 557: arc lint + arc unit
zzag created this revision.Jul 2 2018, 7:56 AM
Restricted Application added a project: KWin. · View Herald TranscriptJul 2 2018, 7:56 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Jul 2 2018, 7:56 AM
broulik added a subscriber: broulik.Jul 2 2018, 9:10 AM
broulik added inline comments.
effects.cpp
1373

Capture &name by reference

zzag updated this revision to Diff 37041.Jul 2 2018, 9:44 AM

Capture by reference.

zzag marked an inline comment as done.Jul 2 2018, 9:44 AM
broulik accepted this revision.Jul 3 2018, 7:09 AM
This revision is now accepted and ready to land.Jul 3 2018, 7:09 AM
romangg accepted this revision.Jul 3 2018, 7:45 AM
This revision was automatically updated to reflect the committed changes.