D17528: Refactor SlaveInterface::calcSpeed
David Faure
noreply at phabricator.kde.org
Tue Dec 18 16:22:12 GMT 2018
dfaure requested changes to this revision.
dfaure added a comment.
This revision now requires changes to proceed.
endless refactoring, for the better :-)
INLINE COMMENTS
> slaveinterface.cpp:119
> + d->transfer_details.clear();
> + d->transfer_details.append({elapsed_time, (d->filesize - d->offset)});
> }
.append(last) would do the same in a more compact way.
... and then this means we could reduce code size even further by calculating lspeed *before* doing the append.
first = ...
last = ...
lspeed = ...
if (!lspeed) {
d->transfer_details.clear();
}
d->transfer_details.append(last);
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D17528
To: chinmoyr, dfaure
Cc: bruns, kde-frameworks-devel, michaelh, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181218/e724db15/attachment.html>
More information about the Kde-frameworks-devel
mailing list