D12388: Output device color curves correction
Vlad Zagorodniy
noreply at phabricator.kde.org
Thu May 3 15:00:02 UTC 2018
zzag added inline comments.
INLINE COMMENTS
> outputdevice.cpp:321
> +
> + auto setCurve = [](struct wl_array *curve, QVector<quint16> *destination) {
> + destination->resize(curve->size / sizeof(uint16_t));
That's not C so you can get rid of `struct` keyword. ;-)
Also, you could constify `curve` to show that it's read-only.
> outputconfiguration_interface.cpp:208
> +
> + auto checkArg = [](wl_array *newColor, const QVector<quint16> &oldColor) {
> + return (newColor->size % sizeof(uint16_t) == 0) &&
constify newColor?
Also, you could cast oldColor.size() in C++ manner, e.g. static_cast<size_t>(...)?
> outputconfiguration_interface.cpp:221
> +
> + auto fillVector = [](wl_array *array, QVector<quint16> *v) {
> + uint16_t *pos = (uint16_t*)array->data;
constify wl_array?
constify pos, e.g. `uint16_t const *pos`?
> outputdevice_interface.cpp:420
> +
> + auto fillArray = [](QVector<quint16> &origin, wl_array *dest) {
> + for (auto c : origin) {
constify origin?
Can't you memcpy here?
REPOSITORY
R127 KWayland
REVISION DETAIL
https://phabricator.kde.org/D12388
To: romangg, #frameworks, davidedmundson, graesslin
Cc: graesslin, davidedmundson, zzag, cfeck, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180503/264c75b0/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list