GCC 9 warns about deprecation of implicit copy ctor:
https://build.kde.org/job/Applications/job/kig/job/kf5-qt5%20SUSEQt5.12/14/warnings30Result/
aacid |
KDE Edu |
GCC 9 warns about deprecation of implicit copy ctor:
https://build.kde.org/job/Applications/job/kig/job/kf5-qt5%20SUSEQt5.12/14/warnings30Result/
Compiles on my gcc 8.3.1. GCC 9 is not tested, the solution is stolen from Internet.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
this is a tricky one, on one hand, yes this fixes the warning and behaves like it used to, so that's "good"
On the other hand introduces an imbalance in which the copy constructor calls normalize but the assignment operator doesn't, think that's "bad"
What do you think about actually implementing the operator= and calling normalize in it?
I might be wrong, but does the usage of normalize() in all constructors imply that it is impossible to assign "unnormalized" Rects?
you can then call setHeight manually after creating a Rect and it becomes unnormalized