D27626: refactor: fix various compiler warnings
Roman Gilg
noreply at phabricator.kde.org
Tue Feb 25 14:47:29 GMT 2020
romangg added inline comments.
INLINE COMMENTS
> dvratil wrote in output_model.h:90
> 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.
Thanks for the interesting explanation. I find it impractical that the usefulness of the noexcept keyword here depends on internals of the Qt classes. One would wish this is advertised to the consumer without knowing the internals. Or is it somewhere I'm not aware of?
REPOSITORY
R104 KScreen
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D27626
To: dvratil, #plasma, romangg
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/9248dcf3/attachment.html>
More information about the Plasma-devel
mailing list