Fix warning: -Wdeprecated-copy - implement StrutRect::operator=

Authored by gladhorn on Aug 11 2019, 9:51 AM.



/home/frederik/kdesrc/kde/workspace/kwin/geometry.cpp:156:88: warning: implicitly-declared ‘constexpr KWin::StrutRect& KWin::StrutRect::operator=(const KWin::StrutRect&)’ is deprecated [-Wdeprecated-copy]

156 |             *strut = StrutRect((*strut).intersected(clientsScreenRect), (*strut).area());
    |                                                                                        ^

In file included from /home/frederik/kdesrc/kde/workspace/kwin/rules.h:32,

from /home/frederik/kdesrc/kde/workspace/kwin/client.h:27,
from /home/frederik/kdesrc/kde/workspace/kwin/geometry.cpp:30:

/home/frederik/kdesrc/kde/workspace/kwin/utils.h:113:5: note: because ‘KWin::StrutRect’ has user-provided ‘KWin::StrutRect::StrutRect(const KWin::StrutRect&)’

113 |     StrutRect(const StrutRect& other);
    |     ^~~~~~~~~

Diff Detail

R108 KWin
Lint OK
No Unit Test Coverage
Build Status
Buildable 14973
Build 14991: arc lint + arc unit
gladhorn created this revision.Aug 11 2019, 9:51 AM
Restricted Application added a project: KWin. · View Herald TranscriptAug 11 2019, 9:51 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
gladhorn requested review of this revision.Aug 11 2019, 9:51 AM
zzag accepted this revision.Aug 11 2019, 1:41 PM
zzag added a subscriber: zzag.

Huh, looks like I overlooked this one. Thank you for fixing it. :-)

This revision is now accepted and ready to land.Aug 11 2019, 1:41 PM
This revision was automatically updated to reflect the committed changes.