D27626: refactor: fix various compiler warnings

Daniel Vrátil noreply at phabricator.kde.org
Tue Feb 25 13:18:22 GMT 2020


dvratil added inline comments.

INLINE COMMENTS

> romangg wrote in output_model.h:90
> Why to add and why noexcept?

Because in `output_model.cpp:224` we do `m_outputs.insert(i, Output(output, pos))`, which can make use of move semantics.

Making move operations `noexcept` is part of Cpp Core Guidelines <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c66-make-move-operations-noexcept> and because `QSharedPointer`'s move ctor is `noexcept` and `QPoint` is trivially movable, the move operations here are also `noexcept`.

If it has any benefit here, since we possibly don't even have exceptions enabled in kscreen, is a question - I wrote it by force of habit.

REPOSITORY
  R104 KScreen

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

To: dvratil, #plasma
Cc: romangg, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200225/510cf98c/attachment.html>


More information about the Plasma-devel mailing list