[effects] Don't use dynamic_cast
ClosedPublic

Authored by zzag on Dec 8 2018, 12:56 PM.

Details

Summary

qobject_cast has several advantages over dynamic_cast:

  • it works without RTTI;
  • it's usually faster.

Also, when it comes to casting QObjects, qobject_cast is de facto
standard.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Dec 8 2018, 12:56 PM
Restricted Application added a project: KWin. · View Herald TranscriptDec 8 2018, 12:56 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Dec 8 2018, 12:56 PM
davidedmundson accepted this revision.Dec 8 2018, 12:58 PM
This revision is now accepted and ready to land.Dec 8 2018, 12:58 PM
This revision was automatically updated to reflect the committed changes.