D14081: Fix types, improve readability
Vlad Zagorodniy
noreply at phabricator.kde.org
Sat Jul 14 08:46:00 BST 2018
zzag added inline comments.
INLINE COMMENTS
> xcbeventlistener.cpp:135
>
> - xcb_generic_event_t* e = static_cast<xcb_generic_event_t *>(message);
> + auto* e = static_cast<xcb_generic_event_t *>(message);
> const uint8_t xEventType = e->response_type & ~0x80;
`auto *e`
> broulik wrote in xcbeventlistener.cpp:151
> I prefer to keep `*` and `&` even for when using `auto`
Also, keeping `*` in some cases matter. For example,
int x = 42;
const auto foo = &x; // foo has type of int* const
*foo = 43; // totally fine
const auto *bar = &x; // bar has type of const int*
*bar = 43; // compilation error
REPOSITORY
R110 KScreen Library
REVISION DETAIL
https://phabricator.kde.org/D14081
To: gladhorn, #plasma
Cc: zzag, broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180714/11f5fff9/attachment.html>
More information about the Plasma-devel
mailing list