D28195: Avoid double fetch and temporary hex encoding for NTFS attributes

2020-03-22 Thread Stefan Brüns
This revision was automatically updated to reflect the committed changes. Closed by commit R241:56c738dc251b: Avoid double fetch and temporary hex encoding for NTFS attributes (authored by bruns). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D28195?vs=78203=78221#toc REPOSITORY R241

D28195: Avoid double fetch and temporary hex encoding for NTFS attributes

2020-03-22 Thread David Faure
dfaure accepted this revision. dfaure added a comment. This revision is now accepted and ready to land. Oh, I see. Not obvious that this is the reason. `for (decltype(length) n = 0; n < length; ++n)` might be more obvious, although maybe also not very common. I'll let you decide which one

D28195: Avoid double fetch and temporary hex encoding for NTFS attributes

2020-03-22 Thread Stefan Brüns
bruns added inline comments. INLINE COMMENTS > dfaure wrote in file_unix.cpp:533 > 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. To make sure n and length have the same type.

D28195: Avoid double fetch and temporary hex encoding for NTFS attributes

2020-03-22 Thread David Faure
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++ =

D28195: Avoid double fetch and temporary hex encoding for NTFS attributes

2020-03-21 Thread Stefan Brüns
bruns created this revision. bruns added reviewers: Dolphin, dfaure. Herald added a project: Frameworks. Herald edited subscribers, added: kde-frameworks-devel; removed: Frameworks. bruns requested review of this revision. REVISION SUMMARY The attrib is a DWORD (32 bit unsigned int) in the