D28521: Use more UDSEntry::reserve() calls to avoid reallocs on multiple inserts

Aleix Pol Gonzalez noreply at phabricator.kde.org
Thu Apr 2 18:27:57 BST 2020


apol added a comment.


  +1 Makes sense.
  
  Would it be possible to have a constructor such as this?
  
    const UDSEntry destUds = {
                { UDSEntry::UDS_NAME, d->dest.fileName()} ,
                { UDSEntry::UDS_MODIFICATION_TIME, mtimeDest.toMSecsSinceEpoch() / 1000} ,
                { UDSEntry::UDS_CREATION_TIME, ctimeDest.toMSecsSinceEpoch() / 1000} ,
                { UDSEntry::UDS_SIZE, sizeDest}
            };
  
  It would allow for a cleaner text and no need to reserve explicitly.

REPOSITORY
  R241 KIO

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

To: kossebau, #frameworks, dfaure
Cc: apol, ahmadsamir, 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/20200402/43af89bd/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list