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

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

Details

Summary

/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

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
gladhorn created this revision.Sun, Aug 11, 9:51 AM
Restricted Application added a project: KWin. · View Herald TranscriptSun, Aug 11, 9:51 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
gladhorn requested review of this revision.Sun, Aug 11, 9:51 AM
zzag accepted this revision.Sun, Aug 11, 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.Sun, Aug 11, 1:41 PM
This revision was automatically updated to reflect the committed changes.