D28528: UDSEntry: add constructor variant with std::initializer_list
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Fri Apr 3 02:20:03 BST 2020
kossebau added inline comments.
INLINE COMMENTS
> apol wrote in udsentry.h:127
> I'm not sure, it skips the constructor/destructor, but then when it's a string we need to do a memcopy. Are you sure this is faster than the refcounting?
Do you mean deep-copy by memcopy? There should be no such, the `UDSEntryInitListEntry(uint field, const QString &value)` constructor does a normal shared copy:
new(m_u.s) QString(value);
At least by what I understand and the test/experiments told me.
Still chances I missed something, being the first time I do such code, so tear apart where needed :)
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D28528
To: kossebau, #frameworks, dfaure, apol
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200403/53f681ec/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list