D16792: [drm] Code cleanup in DrmOutput class

Roman Gilg <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
romangg added a comment.


  In D16792#359306 <https://phabricator.kde.org/D16792#359306>, @davidedmundson wrote:
  
  > git history tracking
  
  
  I believe the git history is fine as long as lines are only moved around in a commit and not otherwise edited. At least git blame works as intended with the `-M` option:
  
    $ git blame -L 600,610 plugins/platforms/drm/drm_output.cpp
    b21de43b96 (Roman Gilg 2018-11-09 22:58:23 +0100 600)     switch (mode) {
    b21de43b96 (Roman Gilg 2018-11-09 22:58:23 +0100 601)     case DrmOutput::DpmsMode::On:
    b21de43b96 (Roman Gilg 2018-11-09 22:58:23 +0100 602)         return OutputInterface::DpmsMode::On;
    b21de43b96 (Roman Gilg 2018-11-09 22:58:23 +0100 603)     case DrmOutput::DpmsMode::Standby:
    b21de43b96 (Roman Gilg 2018-11-09 22:58:23 +0100 604)         return OutputInterface::DpmsMode::Standby;
    b21de43b96 (Roman Gilg 2018-11-09 22:58:23 +0100 605)     case DrmOutput::DpmsMode::Suspend:
    b21de43b96 (Roman Gilg 2018-11-09 22:58:23 +0100 606)         return OutputInterface::DpmsMode::Suspend;
    b21de43b96 (Roman Gilg 2018-11-09 22:58:23 +0100 607)     case DrmOutput::DpmsMode::Off:
    b21de43b96 (Roman Gilg 2018-11-09 22:58:23 +0100 608)         return OutputInterface::DpmsMode::Off;
    b21de43b96 (Roman Gilg 2018-11-09 22:58:23 +0100 609)     default:
    b21de43b96 (Roman Gilg 2018-11-09 22:58:23 +0100 610)         Q_UNREACHABLE();
    
    $ git blame -M -L 600,610 plugins/platforms/drm/drm_output.cpp
    629cc70123 backends/drm/drm_output.cpp (Sebastian Kügler 2016-03-21 15:11:17 +0100 600)     switch (mode) {
    629cc70123 backends/drm/drm_output.cpp (Sebastian Kügler 2016-03-21 15:11:17 +0100 601)     case DrmOutput::DpmsMode::On:
    629cc70123 backends/drm/drm_output.cpp (Sebastian Kügler 2016-03-21 15:11:17 +0100 602)         return OutputInterface::DpmsMode::On;
    629cc70123 backends/drm/drm_output.cpp (Sebastian Kügler 2016-03-21 15:11:17 +0100 603)     case DrmOutput::DpmsMode::Standby:
    629cc70123 backends/drm/drm_output.cpp (Sebastian Kügler 2016-03-21 15:11:17 +0100 604)         return OutputInterface::DpmsMode::Standby;
    629cc70123 backends/drm/drm_output.cpp (Sebastian Kügler 2016-03-21 15:11:17 +0100 605)     case DrmOutput::DpmsMode::Suspend:
    629cc70123 backends/drm/drm_output.cpp (Sebastian Kügler 2016-03-21 15:11:17 +0100 606)         return OutputInterface::DpmsMode::Suspend;
    629cc70123 backends/drm/drm_output.cpp (Sebastian Kügler 2016-03-21 15:11:17 +0100 607)     case DrmOutput::DpmsMode::Off:
    629cc70123 backends/drm/drm_output.cpp (Sebastian Kügler 2016-03-21 15:11:17 +0100 608)         return OutputInterface::DpmsMode::Off;
    629cc70123 backends/drm/drm_output.cpp (Sebastian Kügler 2016-03-21 15:11:17 +0100 609)     default:
    629cc70123 backends/drm/drm_output.cpp (Sebastian Kügler 2016-03-21 15:11:17 +0100 610)         Q_UNREACHABLE();

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D16792

To: romangg, #kwin
Cc: davidedmundson, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.