dfaure added a comment.
Indeed the hex roundtrip was very unnecessary, well spotted.
INLINE COMMENTS
> file_unix.cpp:533
> char *c = strAttr;
> - char *e = hexAttr.data();
> - *e++ ='0';
> - *e++ = 'x';
> - for (auto n = 0; n < length; n++, c++) {
> - *e++ = digits[(static_cast<uchar>(*c) >> 4)];
> - *e++ = digits[(static_cast<uchar>(*c) & 0x0F)];
> + for (auto n = length; n > 0; --n, c++) {
> + intAttr <<= 8;
Given that the value of `n` isn't used, any reason why this doesn't iterate
upwards instead, as the old code was doing? I just find it more usual and
readable.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D28195
To: bruns, #dolphin, dfaure
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns