D12233: Avoid manipulation of lists with quadratic complexity

Jaime Torres Amate noreply at phabricator.kde.org
Thu Apr 19 20:20:35 UTC 2018


jtamate added inline comments.

INLINE COMMENTS

> pendingfilequeue.cpp:68
> +        const auto startRemoving = std::partition(m_cache.begin(), end, isDescendant);
> +        for (auto it = startRemoving; it != end; it++) {
> +            m_pendingFiles.remove(it->path());

According to std::partition <http://en.cppreference.com/w/cpp/algorithm/partition>
what matches isDescendant should be from m_cache.begin() up to startRemoving, unless you want to remove what does not match isDescendant, isn't it?

REPOSITORY
  R293 Baloo

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

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


More information about the Kde-frameworks-devel mailing list