D12233: Avoid manipulation of lists with quadratic complexity

Stefan BrĂ¼ns noreply at phabricator.kde.org
Mon Apr 16 17:10:08 UTC 2018


bruns added inline comments.

INLINE COMMENTS

> michaelh wrote in fileindexscheduler.cpp:148
> I suppose developers on my level will appreciate code to be most self-explanatory. I'm not objecting though, we might al well go "all the way":
> 
>   list.erase(std::remove_if(list.begin(), list.end(), [&dir](const QString& file) {
>           return file.startsWith(dir);
>       }), list.end());

Following Qt coding style, the `[] () {` should go on a separate line, as written above

I think having list.erase as a separate statement makes reading simpler.

REPOSITORY
  R293 Baloo

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

To: michaelh, #baloo
Cc: bruns, #frameworks, ashaposhnikov, michaelh, astippich, spoorun, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180416/e1569071/attachment.html>


More information about the Kde-frameworks-devel mailing list