D28528: UDSEntry: add constructor variant with std::initializer_list

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Sun May 24 16:43:12 BST 2020


kossebau abandoned this revision.
kossebau added a comment.


  As I am not sure about the risk introduced  by the just-works-currently alignment in the union, I would rather discard this patch for now. Going from union to having both fields increases the runtime for what I measured, despite the reserve(), so also not eager to add that just for some syntactic sugar.
  Happy to have somebody else pick this up though, just not continuing myself.

INLINE COMMENTS

> dfaure wrote in udsentry.h:132
> Why not simply QString*?

How would you see `QString*` be used here?

> dfaure wrote in udsentrybenchmark.cpp:141
> std::move(entry) if you want to skip the copying?

This test is a copy from UDSEntryBenchmark::createSmallEntries() just with different UDSEntry constructor so I did not question things :)
Though append() might be what the benchmark is about?

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D28528

To: kossebau, #frameworks, dfaure, apol
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200524/60aea348/attachment.htm>


More information about the Kde-frameworks-devel mailing list